Skip to content

Commit

Permalink
fix: better error handling of build script
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkXia committed Nov 28, 2023
1 parent 92157d8 commit 5ab05ea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ice/bin/ice-cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
...parseUnknownOptions(ctx.args),
...commandArgs,
} });
service.run();
service.run().catch((error) => {
console.log(chalk.red('Build Error'), error);
// Set exit code to 1 to exit process with failure code, otherwise CI may regard build as success.
process.exit(1);
});
});

program
Expand Down

0 comments on commit 5ab05ea

Please sign in to comment.