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

Make error.killed and error.isCanceled always boolean (not undefined) #229

Merged
merged 1 commit into from May 10, 2019

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented May 10, 2019

The killed and isCanceled properties of error should always be true or false, not undefined. This makes the interface simpler and more predictable.

This PR solves the use cases where it could have been undefined, e.g. when using execa.sync().

It also adds related tests.

@ehmicky ehmicky requested a review from sindresorhus May 10, 2019 12:00
@ehmicky ehmicky changed the title Make error.killed and error.isCanceled always boolean (not undefined) [WIP] Make error.killed and error.isCanceled always boolean (not undefined) May 10, 2019
@ehmicky ehmicky changed the title [WIP] Make error.killed and error.isCanceled always boolean (not undefined) Make error.killed and error.isCanceled always boolean (not undefined) May 10, 2019
@sindresorhus
Copy link
Owner

Can you fix the merge conflict?

@ehmicky
Copy link
Collaborator Author

ehmicky commented May 10, 2019

Fixed.

@sindresorhus sindresorhus merged commit bb36e6d into master May 10, 2019
@sindresorhus sindresorhus deleted the feature/normalize-error branch May 10, 2019 16:41
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