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

This commit is contained in:
Pieter Vander Vennet 2024-08-08 22:40:43 +02:00
parent a3090c0d60
commit 9c64ef6814

View file

@ -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() {