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

Do not error a stream when another stream only aborted #822

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

Do not error a stream when another stream only aborted #822

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

Comments

@ehmicky
Copy link
Collaborator

ehmicky commented Feb 17, 2024

Execa pipes multiple streams internally. For example {stdin: webStream} pipes webStream to childProcess.stdin. Also, transforms pipe with each other and with childProcess.std*.

We pipe the source and the destination stream with source.pipe(destination). When either aborts or errors, we destroy the other stream, for cleanup and error handling purposes.

Node.js streams distinguish between aborting (stream.destroy()) and erroring (stream.destroy(error)). The propagation logic described above currently does not make that distinction. So when a stream is aborted, the other streams are errored instead of being aborted as well.

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