From 188c0053253963c55466f03df736ffdd742f77c6 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Thu, 17 Oct 2024 09:55:46 +0900 Subject: [PATCH] address comments --- build/tools/serve.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build/tools/serve.js b/build/tools/serve.js index 960fc18d..80c17b2e 100644 --- a/build/tools/serve.js +++ b/build/tools/serve.js @@ -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); + } }); }