Skip to content

Commit e71a9e2

Browse files
authored
fix: swallow broken pipe errors (#73)
1 parent cf919de commit e71a9e2

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- Swallow broken pipe errors ([#73](https://github.com/stac-utils/stacrs/pull/73))
12+
913
## [0.5.9-beta.0] - 2025-03-03
1014

1115
### Added

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)