diff --git a/index.js b/index.js index 6261c3abfd..97d2630f8b 100644 --- a/index.js +++ b/index.js @@ -239,19 +239,7 @@ function getErrorPrefix({timedOut, timeout, signal, exitCodeName, exitCode, isCa return `was killed with ${signal}`; } - if (exitCodeName !== undefined && exitCode !== undefined) { - return `failed with exit code ${exitCode} (${exitCodeName})`; - } - - if (exitCodeName !== undefined) { - return `failed with exit code ${exitCodeName}`; - } - - if (exitCode !== undefined) { - return `failed with exit code ${exitCode}`; - } - - return 'failed'; + return `failed with exit code ${exitCode} (${exitCodeName})`; } function joinCommand(command, args) {