Skip to content

Commit

Permalink
Pretty print errors on cli
Browse files Browse the repository at this point in the history
  • Loading branch information
mccraveiro committed Dec 20, 2018
1 parent fe91a61 commit 9c7a2dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/marked
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,10 @@ function camelize(text) {
if (!module.parent) {
process.title = 'marked';
main(process.argv.slice(), function(err, code) {
if (err) throw err;
if (err) {
console.error(err.message);
return process.exit(1);
}
return process.exit(code || 0);
});
} else {
Expand Down

0 comments on commit 9c7a2dd

Please sign in to comment.