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

Function buildRelaunchArgv

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

Source from the content-addressed store, hash-verified

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

Calls

no outgoing calls

Tested by

no test coverage detected