Skip to content

Commit

Permalink
Separate original error message with a newline (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky authored and sindresorhus committed May 14, 2019
1 parent 8ca5dcb commit 27d7b1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -176,7 +176,7 @@ function makeError(result, options) {
const message = `Command ${prefix}: ${joinedCommand}`;

if (error instanceof Error) {
error.message = `${message}${error.message}`;
error.message = `${message}\n${error.message}`;
} else {
error = new Error(message);
}
Expand Down

0 comments on commit 27d7b1e

Please sign in to comment.