MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / buildRelaunchArgv

Function buildRelaunchArgv

src/extraction/wasm-runtime-flags.ts:99–108  ·  view source on GitHub ↗
(
  scriptPath: string,
  scriptArgs: readonly string[],
  execArgv: readonly string[] = process.execArgv
)

Source from the content-addressed store, hash-verified

97 * and its args. Pure — exported for unit testing.
98 */
99export function buildRelaunchArgv(
100 scriptPath: string,
101 scriptArgs: readonly string[],
102 execArgv: readonly string[] = process.execArgv
103): string[] {
104 const preserved = execArgv.filter(
105 (arg) => !WASM_RUNTIME_FLAGS.includes(arg) && !NODE_RUNTIME_FLAGS.includes(arg)
106 );
107 return [...NODE_RUNTIME_FLAGS, ...WASM_RUNTIME_FLAGS, ...preserved, scriptPath, ...scriptArgs];
108}
109
110/**
111 * If the current process is missing the WASM runtime flags, re-exec it once

Calls

no outgoing calls

Tested by

no test coverage detected