Skip to content

Commit

Permalink
fix: better error handling of build script (#6672)
Browse files Browse the repository at this point in the history
* fix: better error handling of build script

* chore: changeset
  • Loading branch information
ClarkXia authored Nov 29, 2023
1 parent f926df2 commit ddff555
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/slimy-rats-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ice/app': patch
---

chore: better error handling for build script
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 ddff555

Please sign in to comment.