Skip to content

Commit

Permalink
Merge pull request #1059 from glenjamin/master
Browse files Browse the repository at this point in the history
Ensure process exit code is preserved when using --no-exit
  • Loading branch information
Travis Jeffery committed Dec 6, 2013
2 parents 0e6dda9 + 8aafaa4 commit b9de1f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/_mocha
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,11 @@ if (program.watch) {
// load

mocha.files = files;
mocha.run(program.exit ? process.exit : function() {});
mocha.run(program.exit ? process.exit : exitLater);

function exitLater(code) {
process.on('exit', function() { process.exit(code) })
}

// enable growl notifications

Expand Down

0 comments on commit b9de1f3

Please sign in to comment.