-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
install panics on broken pipe #5234
Comments
Besides the error being a little verbose, I think it shows desirable and correct behavior. As cargo's |
As there hasn't been any activity here in over 6 months I've marked this as stale and if no further activity happens for 7 days I will close it. I'm a bot so this may be in error! If this issue should remain open, could someone (the author, a team member, or any interested party) please comment to that effect? The team would be especially grateful if such a comment included details such as:
Thank you for contributing! (The cargo team is currently evaluating the use of Stale bot, and using #6035 as the tracking issue to gather feedback.) If you're reading this comment from the distant future, fear not if this was closed automatically. If you believe it's still an issue please leave a comment and a team member can reopen this issue. Opening a new issue is also acceptable! |
This is still an issue, and I just encountered it recently. wasmtime checks if
|
I get this too when piping I updated with rustup and still see it.
|
I was taking a look at this and trying to understand how most tools typically behave. I'm thinking perhaps it makes sense to have different behavior for different commands. I'd propose: things like |
On Sun, Jan 26, 2020 at 03:35:16PM -0800, Eric Huss wrote:
I was taking a look at this and trying to understand how most tools typically behave. I'm thinking perhaps it makes sense to have different behavior for different commands. I'd propose: things like `cargo search` or `cargo install --list` can ignore errors printing to stdout. Regular builds (like `cargo build`) should error out if stdout or stderr is closed. That seems to match the behavior of other tools I've looked at. A lot of C-based tools ignore errors from `printf`. But the build tools I tested all exit with an error if stdout is closed. @joshtriplett WDYT?
Sounds reasonable to me. The question to ask is "is the output of this
something that might get piped to a pager, filter, or similar, and
should this tool die if not all of its output is seen or captured".
So, tools that should exit quietly on EPIPE:
- cargo install --list
- cargo locate-project
- cargo metadata
- cargo owner --list
- cargo pkgid
- cargo read-manifest
- cargo run
- cargo search
- cargo version
|
Noticed while mistyping grep cmd searching in cargo install --list output:
The text was updated successfully, but these errors were encountered: