Skip to content

Exit cleanly when stdout is closed - #1923

Open
magrathean-uk wants to merge 1 commit into
rustic-rs:mainfrom
magrathean-uk:fix/1915-broken-pipe
Open

magrathean-uk wants to merge 1 commit into
rustic-rs:mainfrom
magrathean-uk:fix/1915-broken-pipe

Conversation

@magrathean-uk

Copy link
Copy Markdown
Contributor

When a downstream command closes stdout early (for example, rustic snapshots | head), Rustic currently panics while printing. Treat a broken stdout pipe as a normal termination and preserve other output errors.

Fixes #1915. The same behavior is reported in #1878.

Validation: cargo test --locked --test broken_pipe passed from a clean main-based branch, and the combined CLI suite passed 70 tests with one existing live-fixture test ignored. The exact less scenario from #1878 was not reproduced separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Panic on broken pipe when stdout is closed (e.g. piping to head)

1 participant