fix: fail code when build fails in production

In production it is useful to fail with proper exit code. To avoid
silently pushing bad assets in built pipelines.
This commit is contained in:
Ankush Menat 2022-09-14 19:33:23 +05:30 committed by Ankush Menat
parent 06aaaaaedf
commit 1ba99396bc

View file

@ -103,7 +103,7 @@ async function execute() {
log_error("There were some problems during build");
log();
log(chalk.dim(e.stack));
if (process.env.CI) {
if (process.env.CI || PRODUCTION) {
process.kill(process.pid);
}
return;