Skip to content

Commit

Permalink
Ensure process exit code is preserved when using --no-exit
Browse files Browse the repository at this point in the history
  • Loading branch information
sky-glenjamin committed Dec 5, 2013
1 parent ac5af6a commit 8aafaa4
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 @@ -348,7 +348,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 8aafaa4

Please sign in to comment.