Permalink
Browse files

Exit with 1 on error

We were finding that the process was exiting with 0, therefore the
build wasn't failing on error. This seems incorrect so changing
it to exit with 1 when errors.
  • Loading branch information...
1 parent c6f0a37 commit d314aad54db4e682071309ab6b8cebd1194198fd @msecret msecret committed Aug 24, 2016
Showing with 4 additions and 0 deletions.
  1. +4 −0 bin/cli.js
View
@@ -37,6 +37,10 @@ stylelint.lint({
}).then(function(output) {
var outputFormatter = formatters[formatter];
console.log(outputFormatter && outputFormatter(output.results));
+ if (output.errored) {
+ process.exit(1);
+ }
}).catch(function(err) {
console.log(err);
+ process.exit(1);
});

0 comments on commit d314aad

Please sign in to comment.