MCPcopy
hub / github.com/desktop/desktop / cb

Function cb

app/src/cli/main.ts:6–16  ·  view source on GitHub ↗
(e: unknown | null, stderr?: string)

Source from the content-addressed store, hash-verified

4
5const 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)

Callers 3

addEventListenerMethod · 0.50
createObservableRefFunction · 0.50

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected