Skip to content

Commit

Permalink
Exit with code 255 if more errors than 255 were returned. Fixes #2438
Browse files Browse the repository at this point in the history
  • Loading branch information
Munter committed Sep 17, 2016
1 parent 7148a7f commit 758f412
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/_mocha
Expand Up @@ -442,7 +442,7 @@ if (program.watch) {

function exitLater(code) {
process.on('exit', function() {
process.exit(code);
process.exit(Math.min(code, 255));
});
}

Expand All @@ -452,7 +452,7 @@ function exit(code) {
// https://github.com/visionmedia/mocha/issues/333 has a good discussion
function done() {
if (!(draining--)) {
process.exit(code);
process.exit(Math.min(code, 255));
}
}

Expand Down

0 comments on commit 758f412

Please sign in to comment.