Skip to content

Conversation

@naoNao89
Copy link
Contributor

This fixes the issue where cat --version or cat --help would silently succeed when output fails, like when redirecting to /dev/full. Now the error wrapper properly detects write failures and reports them with appropriate exit codes.

@oech3's concern on commit 9cc2e09, where the original error handling change prevented panics but also silently ignored write failures for version and help output.

@naoNao89 naoNao89 force-pushed the fix/cat-version-help-dev-full-error branch from 8828b70 to 73af569 Compare January 13, 2026 17:48
@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/shuf/shuf-reservoir (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/sort/sort-stale-thread-mem (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tty/tty-eof (fails in this run but passes in the 'main' branch)

- Modified ClapErrorWrapper to detect and report when printing --version/--help fails
- Added test_version_help_dev_full to verify error handling
- Fixes issue where cat --version > /dev/full silently succeeded instead of failing

Addresses feedback from commit 9cc2e09
@naoNao89 naoNao89 force-pushed the fix/cat-version-help-dev-full-error branch from 73af569 to 9da046c Compare January 13, 2026 19:21
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.

1 participant