diff --git a/CHANGELOG.md b/CHANGELOG.md index 577653f..b50f8d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- Swallow broken pipe errors ([#73](https://github.com/stac-utils/stacrs/pull/73)) + ## [0.5.9-beta.0] - 2025-03-03 ### Added diff --git a/src/cli.rs b/src/cli.rs index 5497207..17f70b5 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -33,6 +33,15 @@ pub fn main(py: Python<'_>) -> PyResult { match args.run(false).await { Ok(()) => 0, Err(err) => { + // https://github.com/stac-utils/stacrs/issues/72 + // + // Don't know why this happens through the Python CLI + // entry but not through the Rust one 🤷 + if let Some(err) = err.downcast_ref::() { + if err.kind() == std::io::ErrorKind::BrokenPipe { + return 0; + } + } eprintln!("ERROR: {}", err); 1 }