We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b86352b commit 1befccdCopy full SHA for 1befccd
lib/exit.js
@@ -32,4 +32,10 @@ module.exports = function exit(exitCode, streams) {
32
});
33
// If all streams were already drained, exit now.
34
tryToExit();
35
+ // In Windows, when run as a Node.js child process, a script utilizing
36
+ // this library might just exit with a 0 exit code, regardless. This code,
37
+ // despite the fact that it looks a bit crazy, appears to fix that.
38
+ process.on('exit', function() {
39
+ process.exit(exitCode);
40
+ });
41
};
0 commit comments