diff --git a/scripts/cli-e2e-test.js b/scripts/cli-e2e-test.js index 4ab41a7a58..d71ae81050 100644 --- a/scripts/cli-e2e-test.js +++ b/scripts/cli-e2e-test.js @@ -46,6 +46,9 @@ function print(msg) { } async function waitForExit(child) { + if (child.exitCode !== null) { + throw new Error(`Child already exited with code ${child.exitCode}`); + } await new Promise((resolve, reject) => child.once('exit', code => { if (code) {