Skip to content

Commit

Permalink
fix: handle top-level errors more gracefully
Browse files Browse the repository at this point in the history
When the application throws an error, it will be reported to the
console and process stopped with an exit code of 1.
  • Loading branch information
wms committed Sep 5, 2018
1 parent b92da92 commit 1768716
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,7 @@ const main = async () => {
console.log(`To apply these changes to your Helmfile, re-run with the '--apply' flag`);
};

main();
main().catch(err => {
console.error(err);
process.exit(1);
});

0 comments on commit 1768716

Please sign in to comment.