Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate original error message with a newline #245

Merged
merged 1 commit into from May 14, 2019

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented May 14, 2019

When a child process terminated because an error event has been sent to it (or to stdin), which is not so common, we keep the original error message. This PR puts that message on the next line.

At the moment:

> (await execa('wrong command', { reject: false })).message
Command failed with exit code 2 (ENOENT): wrong commandspawn wrong ENOENT

With this PR, this is now:

> (await execa('wrong command', { reject: false })).message
Command failed with exit code 2 (ENOENT): wrong command
spawn wrong ENOENT

@sindresorhus sindresorhus merged commit 27d7b1e into master May 14, 2019
@ehmicky ehmicky deleted the feature/original-error branch May 14, 2019 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants