Skip to content

Commit 9040cbe

Browse files
committed
fix(spawnify) emit: close, exit more than once
1 parent 68b6f00 commit 9040cbe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/spawnify.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,13 @@
108108
* close and exit events
109109
* whould not be emitted
110110
*/
111-
if (event === 'error' && data.code === 'EACCES')
111+
if (event === 'error' && data.code === 'EACCES') {
112112
if (count('close'))
113113
this.emit('close');
114114

115115
if (count('exit'))
116116
this.emit('exit');
117+
}
117118
}
118119
};
119120

0 commit comments

Comments
 (0)