diff --git a/lib/utils/exit-handler.js b/lib/utils/exit-handler.js index 0b9ee3da57c60..64117949357a4 100644 --- a/lib/utils/exit-handler.js +++ b/lib/utils/exit-handler.js @@ -140,10 +140,8 @@ const exitHandler = err => { // will presumably print its own errors and exit with a proper status // code if there's a problem. If we got an error with a code=0, then... // something else went wrong along the way, so maybe an npm problem? - const isShellout = npm.isShellout - const quietShellout = isShellout && typeof err.code === 'number' && err.code - if (quietShellout) { - exitCode = err.code || 0 + if (npm.isShellout && typeof err.code === 'number' && err.code) { + exitCode = err.code suppressLogMessage = true } else if (typeof err === 'string') { // XXX: we should stop throwing strings