radicle-heartwood-lfs/crates/radicle-cli
Fintan Halpenny e1f16bee26 term: Catch EPIPE and swallow
Rust (since 1.62) ignores EPIPE by default (see [Rust #62569]),
causing writes to closed pipes to return `io::ErrorKind::BrokenPipe`
errors.  The `println!` macro panics on these errors, producing a
confusing backtrace instead of the silent exit expected of Unix CLI
tools.

To avoid the use of `print!` and `println!`, the `radicle-term`
helper functions use `write!` and `writeln!`. This lays the groundwork
for the `rad` CLI to transition to using only `radicle-term`
functions.

There was a first attempt made, which is documented here.  A
process-wide SIGPIPE reset (`SIG_DFL`) was ruled out because `rad`
manages child processes via libgit2 pipes and communicates with the
radicle node over Unix sockets. Resetting SIGPIPE globally caused
`rad` itself to be killed during internal pipe operations (e.g. during
`rad remote add --fetch`), producing flaky test failures.

[Rust #62569] https://github.com/rust-lang/rust/issues/62569
2026-04-29 10:57:24 +02:00
..
examples treewide: radicle.{xyz → dev,network} 2026-04-27 18:34:30 +02:00
src treewide: Avoid `git2::Oid::zero` 2026-04-28 14:35:38 +02:00
tests term: Catch EPIPE and swallow 2026-04-29 10:57:24 +02:00
CHANGELOG.md cli: Update to 0.20.0 2026-03-26 15:32:43 +00:00
Cargo.toml I2P Support 2026-04-15 12:01:50 +01:00
build.rs repo: Move workspace crates into `crates` subdirectory 2025-06-09 15:09:21 +02:00