MCPcopy Index your code
hub / github.com/codeaashu/claude-code / parseExitCode

Function parseExitCode

web/components/tools/ToolBash.tsx:45–49  ·  view source on GitHub ↗
(result: string)

Source from the content-addressed store, hash-verified

43
44// Parse exit code from result — bash tool often appends it
45function parseExitCode(result: string): number | null {
46 const match = result.match(/\nExit code: (\d+)\s*$/);
47 if (match) return parseInt(match[1], 10);
48 return null;
49}
50
51function stripExitCode(result: string): string {
52 return result.replace(/\nExit code: \d+\s*$/, "");

Callers 1

ToolBashFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected