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

Function spawnScriptArgs

src/bridge/bridgeMain.ts:119–124  ·  view source on GitHub ↗

* Returns the args that must precede CLI flags when spawning a child claude * process. In compiled binaries, process.execPath is the claude binary itself * and args go directly to it. In npm installs (node running cli.js), * process.execPath is the node runtime — the child spawn must pass the scr

()

Source from the content-addressed store, hash-verified

117 * and exits with "bad option: --sdk-url". See anthropics/claude-code#28334.
118 */
119function spawnScriptArgs(): string[] {
120 if (isInBundledMode() || !process.argv[1]) {
121 return []
122 }
123 return [process.argv[1]]
124}
125
126/** Attempt to spawn a session; returns error string if spawn throws. */
127function safeSpawn(

Callers 2

bridgeMainFunction · 0.85
runBridgeHeadlessFunction · 0.85

Calls 1

isInBundledModeFunction · 0.85

Tested by

no test coverage detected