(e: unknown | null, stderr?: string)
| 4 | |
| 5 | const run = (...args: Array<string>) => { |
| 6 | function cb(e: unknown | null, stderr?: string) { |
| 7 | if (e) { |
| 8 | console.error(`Error running command ${args}`) |
| 9 | console.error(stderr ?? `${e}`) |
| 10 | process.exit( |
| 11 | typeof e === 'object' && 'code' in e && typeof e.code === 'number' |
| 12 | ? e.code |
| 13 | : 1 |
| 14 | ) |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | if (process.platform === 'darwin') { |
| 19 | execFile('open', ['-n', join(__dirname, '../../..'), '--args', ...args], cb) |
no test coverage detected