MCPcopy Index your code
hub / github.com/coder/mux / parseExitCode

Function parseExitCode

src/node/runtime/backgroundCommands.ts:15–18  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

13 * Returns null if content is empty or not a valid number.
14 */
15export function parseExitCode(content: string): number | null {
16 const code = parseInt(content.trim(), 10);
17 return isNaN(code) ? null : code;
18}
19/**
20 * Parse PID from buildSpawnCommand output.
21 * Returns the PID or null if invalid.

Callers 2

getExitCodeMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected