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
path: root/lib/utils
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2020-08-25 00:38:38 +0300
committerisaacs <i@izs.me>2020-08-25 00:38:38 +0300
commit9f200abb94ea2127d9a104c225159b1b7080c82c (patch)
tree984bb1aa7278616362a1b977c7d6ddbc89085727 /lib/utils
parentb38f68acd9292b7432c936db3b6d2d12e896f45d (diff)
Remove reliance on the _exit pseudo-config in error handler
This flag no longer exists. We just always exit now when we're done.
Diffstat (limited to 'lib/utils')
-rw-r--r--lib/utils/error-handler.js16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/utils/error-handler.js b/lib/utils/error-handler.js
index 720130adf..f713bf021 100644
--- a/lib/utils/error-handler.js
+++ b/lib/utils/error-handler.js
@@ -77,23 +77,17 @@ process.on('exit', code => {
wroteLogFile = false
}
- const doExit = npm.config && npm.config.loaded && npm.config.get('_exit')
- if (doExit) {
- // actually exit.
- if (exitCode === 0 && !itWorked) {
- exitCode = 1
- }
- if (exitCode !== 0) process.exit(exitCode)
- } else {
- itWorked = false // ready for next exit
+ // actually exit.
+ if (exitCode === 0 && !itWorked) {
+ exitCode = 1
}
+ if (exitCode !== 0) process.exit(exitCode)
})
const exit = (code, noLog) => {
exitCode = exitCode || process.exitCode || code
- const doExit = npm.config && npm.config.loaded ? npm.config.get('_exit') : true
- log.verbose('exit', [code, doExit])
+ log.verbose('exit', code)
if (log.level === 'silent') noLog = true
const reallyExit = (er) => {