Skip to content

Commit

Permalink
Still throw- to prevent unintended consequences.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Jan 4, 2014
1 parent 2ab9a10 commit 100722a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions errors/fatal.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ module.exports = {
*/
function _terminateProcess (code) {
if ( process.env.NODE_ENV === 'test' ) {
return process.emit('_sails', {
type: 'terminated',
var Signal = new Error({
type: 'terminate',
code: code
});
process.emit('_sails', Signal);
throw Signal;
}
return process.exit(code);
}

0 comments on commit 100722a

Please sign in to comment.