diff options
author | isaacs <i@izs.me> | 2020-08-25 00:38:38 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2020-08-25 00:38:38 +0300 |
commit | 9f200abb94ea2127d9a104c225159b1b7080c82c (patch) | |
tree | 984bb1aa7278616362a1b977c7d6ddbc89085727 /lib/utils | |
parent | b38f68acd9292b7432c936db3b6d2d12e896f45d (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.js | 16 |
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) => { |