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

docs: state when the promise returned by execa will be rejected #361

Closed
yxliang01 opened this issue Aug 14, 2019 · 3 comments · Fixed by #364
Closed

docs: state when the promise returned by execa will be rejected #361

yxliang01 opened this issue Aug 14, 2019 · 3 comments · Fixed by #364

Comments

@yxliang01
Copy link

There's no clear statement describing the situation when the promise returned by execa will be rejected. I currently assume it's same as the nodejs's built-in child_process.spawn, confirmation needed.

Thanks

@ehmicky
Copy link
Collaborator

ehmicky commented Aug 14, 2019

Hi @yxliang01,

The promise is rejected in the same circumstances as child_process.spawn(), i.e.:

  • input validation
  • the exit code is not 0
  • a terminal signal was sent to the child process
  • there was an internal/OS/lower-level problem creating the child process. For example when launching too many child processes at once.

Additionally the child process might time out or be canceled, which are additional features provided by Execa.

Based on this I am not sure the documentation should state it. I would be happy to accept a PR if you thought otherwise though.

@ehmicky
Copy link
Collaborator

ehmicky commented Aug 15, 2019

Implemented in #364.

@yxliang01
Copy link
Author

👍

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 a pull request may close this issue.

2 participants