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

Function buildRelaunchArgv

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

Source from the content-addressed store, hash-verified

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

Calls

no outgoing calls

Tested by

no test coverage detected