From 2acc8f5d97c4701cf90ebd2bfe41daf24bd9f27d Mon Sep 17 00:00:00 2001 From: Luke Karrys Date: Sat, 2 Dec 2023 13:15:08 -0700 Subject: [PATCH] chore: fix coverage --- lib/utils/exit-handler.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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