Skip to content

Commit b118b00

Browse files
committed
fixup! feat(cli): migrate from oclif to commander
1 parent f69f910 commit b118b00

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

apps/cli/src/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,15 @@ registerRunCommand(program);
4343
registerSendCommand(program);
4444
registerShellCommand(program);
4545

46+
// Global error handling
47+
process.on("uncaughtException", (err) => {
48+
if (process.env.NODE_ENV === "development") {
49+
console.error(err);
50+
} else {
51+
// in production, only print the error message, not the stack trace
52+
console.error(err.message);
53+
}
54+
process.exit(1);
55+
});
56+
4657
program.parse();

0 commit comments

Comments
 (0)