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

fix: handle broken pipe errors gracefully #2110

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wfxr
Copy link

@wfxr wfxr commented Dec 28, 2024

This commit fixed the panic when using ya with pipes:

$ ya pack --list | head -3
plugins:
thread 'main' panicked at std/src/io/stdio.rs:1123:9:
failed printing to stdout: Broken pipe (os error 32)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
zsh: IOT instruction (core dumped)  ya pack --list |
zsh: done                           head -1

When a broken pipe error occurs, we can exit gracefully with a success exit code. This matches existing Unix convention.

When a broken pipe error occurs, we want to exit gracefully with a
success exit code. This matches existing Unix convention.
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.

1 participant