From 9c64ef6814b45eb001da0f5cec7cb763484e82eb Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 8 Aug 2024 22:40:43 +0200 Subject: [PATCH] Script.ts: if an uncaught error occurs, set the exit code to one so that the deploy scripts fails. Should prevent cases like #2069 from happening again --- scripts/Script.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/Script.ts b/scripts/Script.ts index d93bed845..65b2fcfa3 100644 --- a/scripts/Script.ts +++ b/scripts/Script.ts @@ -22,7 +22,10 @@ export default abstract class Script { const green = (s) => "\x1b[92m" + s + "\x1b[0m" console.log(green("All done! (" + millisNeeded + " ms)")) }) - .catch((e) => console.log(`ERROR in script ${process.argv[1]}:`, e)) + .catch((e) => { + console.log(`ERROR in script ${process.argv[1]}:`, e) + process.exit(1) + }) } public printHelp() {