Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
greggman committed Oct 17, 2024
1 parent 9393a3c commit 188c005
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions build/tools/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ function spawnAndCheck(cmd, args, options) {
const s = spawn(cmd, args, options);
spawns.push(s);
s.on('close', (code) => {
console.log(cmd, 'exited with code:', code);
spawns.forEach((s) => s.kill());
process.exit(code);
spawns.splice(spawns.indexOf(s), 1);
if (code !== 0) {
console.log(cmd, 'exited with code:', code);
spawns.forEach((s) => s.kill());
process.exit(code);
}
});
}

Expand Down

0 comments on commit 188c005

Please sign in to comment.