Have runtests always throw on failure, make rm stream signal end of read queue (#30035)

This commit is contained in:
Wesley Wigham 2019-02-21 18:17:53 -08:00 committed by GitHub
parent 592396d40a
commit fb0dcd4987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -140,13 +140,8 @@ async function runConsoleTests(runJs, defaultReporter, runInParallel, watchMode,
await deleteTemporaryProjectOutput();
if (error !== undefined) {
if (watchMode) {
throw error;
}
else {
log.error(error);
process.exit(typeof errorStatus === "number" ? errorStatus : 2);
}
process.exitCode = typeof errorStatus === "number" ? errorStatus : 2;
throw error;
}
}
exports.runConsoleTests = runConsoleTests;

View File

@ -340,6 +340,7 @@ function rm(dest, opts) {
duplex.push(file);
cb();
}
duplex.push(null); // signal end of read queue
};
const duplex = new Duplex({