Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
Catch errors and return exit code 1
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanoverna committed Sep 14, 2020
1 parent b1b3a95 commit d50d287
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/dato.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
require('../lib');
const runCli = require('../lib/cli');

runCli();
runCli().catch(e => {
process.stdout.write(`Command failed with the following error:\n`);
process.stdout.write(`${e.message}\n`);
process.exit(1);
});

0 comments on commit d50d287

Please sign in to comment.