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

Improve stream error handling #49

Merged
merged 1 commit into from
Aug 31, 2024
Merged

Improve stream error handling #49

merged 1 commit into from
Aug 31, 2024

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented Aug 31, 2024

This PR refactors the stream error handling logic.

Since the close event waits for stdin/stdout/stderr to be closed, we do not need to await them.
Also, we were not listening for errors on stdin. We now are.
Also, this handles some specific error types which are piping-related better (will be better tested in the subprocess.pipe() PR, which is coming next).
Finally, this adds a few more tests.

@sindresorhus sindresorhus merged commit d3a2d2c into main Aug 31, 2024
12 checks passed
@sindresorhus sindresorhus deleted the stream-error-handling branch August 31, 2024 08:00
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.

2 participants