* Returns the args that must precede CLI flags when spawning a child CLI * process. In compiled binaries, process.execPath is the CLI 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 script *
()
| 123 | * and exits with "bad option: --sdk-url". |
| 124 | */ |
| 125 | function spawnScriptArgs(): string[] { |
| 126 | if (isInBundledMode() || !process.argv[1]) { |
| 127 | return [] |
| 128 | } |
| 129 | return [process.argv[1]] |
| 130 | } |
| 131 | |
| 132 | /** Attempt to spawn a session; returns error string if spawn throws. */ |
| 133 | function safeSpawn( |
no test coverage detected