MCPcopy
hub / github.com/codeaashu/claude-code / exitWithError

Function exitWithError

src/utils/process.ts:38–43  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

36// Write error to stderr and exit with code 1. Consolidates the
37// console.error + process.exit(1) pattern used in entrypoint fast-paths.
38export function exitWithError(message: string): never {
39 // biome-ignore lint/suspicious/noConsole:: intentional console output
40 console.error(message)
41 // eslint-disable-next-line custom-rules/no-process-exit
42 process.exit(1)
43}
44
45// Wait for a stdin-like stream to close, but give up after ms if no data ever
46// arrives. First data chunk cancels the timeout — after that, wait for end

Callers 2

runFunction · 0.50
mainFunction · 0.50

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected