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

Handle errors from streams passed to the std* option #825

Closed
ehmicky opened this issue Feb 17, 2024 · 0 comments · Fixed by #826
Closed

Handle errors from streams passed to the std* option #825

ehmicky opened this issue Feb 17, 2024 · 0 comments · Fixed by #826

Comments

@ehmicky
Copy link
Collaborator

ehmicky commented Feb 17, 2024

Users can pass Node.js streams to the stdin/stdout/stderr option.

If that stream fail, the promise returned by Execa should fail. This currently happens for any stream created under-the-hood when passing special values to the std* option. For example, when passing {stdout: {file: 'file.txt'}} and a file error happens, Execa will reject with it.

However, this error handling currently only happens when the Node.js stream is passed as an array like {stdout: [stream, 'pipe']} but not when it is passed on its own like {stdout: stream}. We should fix this.

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.

1 participant