Skip to content

Commit 72612cb

Browse files
committed
fix: swallow broken pipe errors
1 parent cf919de commit 72612cb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/cli.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ pub fn main(py: Python<'_>) -> PyResult<i64> {
3333
match args.run(false).await {
3434
Ok(()) => 0,
3535
Err(err) => {
36+
// https://github.com/stac-utils/stacrs/issues/72
37+
//
38+
// Don't know why this happens through the Python CLI
39+
// entry but not through the Rust one 🤷
40+
if let Some(err) = err.downcast_ref::<std::io::Error>() {
41+
if err.kind() == std::io::ErrorKind::BrokenPipe {
42+
return 0;
43+
}
44+
}
3645
eprintln!("ERROR: {}", err);
3746
1
3847
}

0 commit comments

Comments
 (0)