Skip to content

Commit

Permalink
fix: catch the main exceptions
Browse files Browse the repository at this point in the history
Signed-off-by: Amin Yahyaabadi <[email protected]>
  • Loading branch information
aminya committed Mar 30, 2024
1 parent 5923689 commit a6ad893
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
8 changes: 7 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,12 @@ async function main(args: string[]) {
}
}

await main(process.argv);
try {
await main(process.argv);
} catch (err) {
console.error(err);
if (err instanceof Error) {
console.error(err.stack);
}
process.exit(1);
}

0 comments on commit a6ad893

Please sign in to comment.