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

Function invoke

__tests__/bundle-launcher.test.ts:45–50  ·  view source on GitHub ↗
(bundle: string, command: string, args: string[] = [], extraEnv: NodeJS.ProcessEnv = {}, input?: string)

Source from the content-addressed store, hash-verified

43}
44
45function invoke(bundle: string, command: string, args: string[] = [], extraEnv: NodeJS.ProcessEnv = {}, input?: string) {
46 const convert = windows ? '$(cygpath -u "$1")' : '$1';
47 // Exclude system Node: execution must use the runtime in the bundle.
48 return shell(`STAGE="${convert}"\nshift\nPATH="$STAGE/bin:/usr/bin:/bin"\nexport PATH\n${command}`,
49 [bundle, ...args], extraEnv, input);
50}
51
52function probe(bundle: string) {
53 fs.writeFileSync(path.join(bundle, 'lib/dist/bin/codegraph.js'), `

Callers 3

checkForwardingFunction · 0.85
wiringFunction · 0.85

Calls 1

shellFunction · 0.85

Tested by

no test coverage detected