Skip to content

Commit 25cd3de

Browse files
committed
Merge pull request #138 from substack/non-zero
Detect `inErrorState` with code not equal to zero
2 parents 6ff57c2 + e3f9d01 commit 25cd3de

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

index.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,9 @@ function createExitHarness (conf) {
6666

6767
var inErrorState = false;
6868

69-
var $_fatalException = process._fatalException
70-
process._fatalException = function fakeFatalException() {
71-
inErrorState = true;
72-
$_fatalException.apply(this, arguments)
73-
}
74-
7569
process.on('exit', function (code) {
7670
// let the process exit cleanly.
77-
if (inErrorState) {
71+
if (code !== 0) {
7872
return
7973
}
8074

0 commit comments

Comments
 (0)