script/cli-e2e-test: error out if child exits early
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user