Skip to content

Commit 9f200ab

Browse files
committed
Remove reliance on the _exit pseudo-config in error handler
This flag no longer exists. We just always exit now when we're done.
1 parent b38f68a commit 9f200ab

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

lib/utils/error-handler.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,17 @@ process.on('exit', code => {
7777
wroteLogFile = false
7878
}
7979

80-
const doExit = npm.config && npm.config.loaded && npm.config.get('_exit')
81-
if (doExit) {
82-
// actually exit.
83-
if (exitCode === 0 && !itWorked) {
84-
exitCode = 1
85-
}
86-
if (exitCode !== 0) process.exit(exitCode)
87-
} else {
88-
itWorked = false // ready for next exit
80+
// actually exit.
81+
if (exitCode === 0 && !itWorked) {
82+
exitCode = 1
8983
}
84+
if (exitCode !== 0) process.exit(exitCode)
9085
})
9186

9287
const exit = (code, noLog) => {
9388
exitCode = exitCode || process.exitCode || code
9489

95-
const doExit = npm.config && npm.config.loaded ? npm.config.get('_exit') : true
96-
log.verbose('exit', [code, doExit])
90+
log.verbose('exit', code)
9791
if (log.level === 'silent') noLog = true
9892

9993
const reallyExit = (er) => {

0 commit comments

Comments
 (0)