(args)
| 52 | } |
| 53 | |
| 54 | function 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 | |
| 67 | let status; |
| 68 | try { |
no test coverage detected