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

Function runCodegraph

scripts/add-lang/verify-extraction.mjs:54–65  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

52}
53
54function runCodegraph(args) {
55 const options = { encoding: 'utf8' };
56 const bin = process.env.CODEGRAPH_BIN || (process.platform === 'win32' ? findWindowsShim() : null);
57 if (!bin) return execFileSync('codegraph', args, options);
58 if (/\.[cm]?js$/i.test(bin)) return execFileSync(process.execPath, [bin, ...args], options);
59 if (process.platform === 'win32' && /\.(bat|cmd)$/i.test(bin)) {
60 // A single command string with no args array: Node hands it to cmd.exe
61 // unchanged, so the quoting above is all there is.
62 return execFileSync([bin, ...args].map(quoteForCmd).join(' '), { ...options, shell: true });
63 }
64 return execFileSync(bin, args, options);
65}
66
67let status;
68try {

Callers 1

Calls 3

findWindowsShimFunction · 0.85
mapMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected