We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7509752 commit 047455bCopy full SHA for 047455b
bin/_mocha
@@ -405,15 +405,15 @@ if (program.watch) {
405
}
406
407
function exitLater(code) {
408
- process.on('exit', function() { process.exit(code) })
+ process.on('exit', function() { process.exit(Math.min(code, 255)) })
409
410
411
function exit(code) {
412
// flush output for Node.js Windows pipe bug
413
// https://github.com/joyent/node/issues/6247 is just one bug example
414
// https://github.com/visionmedia/mocha/issues/333 has a good discussion
415
function done() {
416
- if (!(draining--)) process.exit(code);
+ if (!(draining--)) process.exit(Math.min(code, 255));
417
418
419
var draining = 0;
0 commit comments