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

Improve error messages when an error event is emitted #269

Merged
merged 4 commits into from May 30, 2019

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented May 30, 2019

When an error event is emitted directly on the child process, the error message is currently bad:

const child = execa('echo');
child.emit('error', new Error('test'));
// Prints: Command failed with exit code undefined (undefined): echo \n test
child.catch(error => console.log(error.message)

This fixes that.

@sindresorhus sindresorhus merged commit 2307d95 into master May 30, 2019
@sindresorhus sindresorhus deleted the feature/process-errors branch May 30, 2019 13:02
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