()
| 42 | }); |
| 43 | |
| 44 | async function main() { |
| 45 | // Happy path: the npm-installed optional dependency. Fall back to a download |
| 46 | // when the registry didn't deliver it. |
| 47 | var resolved = resolveInstalledBundle() || (await selfHealBundle()); |
| 48 | var res = childProcess.spawnSync(resolved.command, resolved.args, { stdio: 'inherit', windowsHide: true }); |
| 49 | if (res.error) { |
| 50 | process.stderr.write('codegraph: ' + res.error.message + '\n'); |
| 51 | process.exit(1); |
| 52 | } |
| 53 | process.exit(res.status === null ? 1 : res.status); |
| 54 | } |
| 55 | |
| 56 | // Resolve the launcher from the installed per-platform optionalDependency. |
| 57 | // Returns {command, args} or null if the package isn't installed. |
no test coverage detected