We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
cargo --help
cargo --help panics when stdout is closed.
There is a discussion about this API papercut upstream: clap-rs/clap#3055.
$ RUST_BACKTRACE=1 cargo --help | false thread 'main' panicked at 'Error writing Error to stdout: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }', /Users/runner/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/clap-2.33.3/src/errors.rs:401:55 stack backtrace: 0: _rust_begin_unwind 1: core::panicking::panic_fmt 2: core::result::unwrap_failed 3: core::result::Result<T,E>::expect 4: clap::errors::Error::exit 5: cargo::exit_with_error 6: cargo::main note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Use the App::get_matches_from_safe API and manually handle the error it returns, suppressing failures to write to either stdout or stderr.
App::get_matches_from_safe
No response
cargo 1.56.0 (4ed5d137b 2021-10-04) release: 1.56.0 commit-hash: 4ed5d137baff5eccf1bae5a7b2ae4b57efad4a7d commit-date: 2021-10-04
The text was updated successfully, but these errors were encountered:
I saw it fixed on clap v2.33.4. Really great! clap-rs/clap@accf3d2
Sorry, something went wrong.
Thanks @weihanglo, would you mind posting a PR that updates our Cargo.toml to "2.34.0"?
Cargo.toml
0507d9f
Successfully merging a pull request may close this issue.
Problem
cargo --help
panics when stdout is closed.There is a discussion about this API papercut upstream: clap-rs/clap#3055.
Steps
Possible Solution(s)
Use the
App::get_matches_from_safe
API and manually handle the error it returns, suppressing failures to write to either stdout or stderr.Notes
No response
Version
The text was updated successfully, but these errors were encountered: