From a60bfc31d9be9ccb480c148827975331d94429cb Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 18 Mar 2020 15:51:11 +0100 Subject: [PATCH] script/cli-e2e-test: error out if child exits early --- scripts/cli-e2e-test.js | 3 +++ 1 file changed, 3 insertions(+) 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) {