Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils/error-handler.js')
-rw-r--r--lib/utils/error-handler.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/utils/error-handler.js b/lib/utils/error-handler.js
index 8aea990fb..fcdbb5e5c 100644
--- a/lib/utils/error-handler.js
+++ b/lib/utils/error-handler.js
@@ -171,7 +171,10 @@ function exit (code) {
function reallyExit() {
itWorked = !code
- if (!itWorked && !doExit) process.emit("exit", code)
+ if (!itWorked) {
+ if (!doExit) process.emit("exit", code)
+ else process.exit(code)
+ }
}
}