-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
more consistent
#248
Conversation
Unrelated to this PR, but what do you think about renaming |
It's weird that the synchronous version has this inconsistency. Should we open a Node.js issue about it? |
That's because
|
You could argue that about |
Yes I thought of that as well. The thing is We can rename |
Good point. Nah, we can keep it as-is. |
error.killed
is alwaystrue
orfalse
withexeca()
.But with
execa.sync()
, it can also beundefined
sometimes, e.g. onENOENT
. This PR ensureserror.killed
is always a boolean.Details:
spawn()
returns achildProcess
withchildProcess.killed
spawnSync()
does not return this, but we can emulate most of the cases by checking thesignal
property.Tests are added for this as well.