Skip to content

Commit

Permalink
Remove dead code related to exit code names (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky authored and sindresorhus committed May 7, 2019
1 parent c0d058c commit 3e7ea99
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions index.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 3e7ea99

Please sign in to comment.