Skip to content

Commit cde24f0

Browse files
committed
Shell out to another process for codiff during development.
1 parent e6f114a commit cde24f0

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

bin/codiff.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,18 @@ const run = () => {
2929
}
3030

3131
const child = spawn(electron, [root], {
32+
detached: true,
3233
env: {
3334
...process.env,
3435
CODIFF_COMMIT_REF: commitRef ?? '',
3536
CODIFF_PULL_REQUEST_URL: pullRequestUrl ?? '',
3637
CODIFF_REPOSITORY_PATH: requestedPath,
3738
CODIFF_WALKTHROUGH: walkthrough ? '1' : '',
3839
},
39-
stdio: 'inherit',
40+
stdio: 'ignore',
4041
});
4142

42-
child.on('exit', (code, signal) => {
43-
if (signal) {
44-
process.kill(process.pid, signal);
45-
return;
46-
}
47-
48-
process.exit(code ?? 0);
49-
});
43+
child.unref();
5044
};
5145

5246
run();

0 commit comments

Comments
 (0)