EmbarkStudios / cargo-about

📜 Cargo plugin to generate list of all licenses for a crate 🦀
http://embark.rs
Apache License 2.0
550 stars 32 forks source link

panics on SIGPIPE #252

Closed felinira closed 3 months ago

felinira commented 3 months ago

Describe the bug When encountering SIGPIPE, the program panics. This is almost never correct, but default rust behaviour:

https://github.com/rust-lang/rust/issues/46016 https://github.com/rust-lang/rust/issues/62569

To Reproduce

# cargo about generate --format json | head -n0
thread 'main' panicked at library/std/src/io/stdio.rs:1118:9:
failed printing to stdout: Broken pipe (os error 32)

Expected behavior cargo about should not panic. Instead it should handle SIGPIPE and exit with exit code 141. See https://github.com/kurtbuilds/sigpipe for an example on how to solve this.

Device: