Skip to content

head: fix error message when input is a directory#11541

Open
aguimaraes wants to merge 1 commit intouutils:mainfrom
aguimaraes:head-fix-directory-error-message
Open

head: fix error message when input is a directory#11541
aguimaraes wants to merge 1 commit intouutils:mainfrom
aguimaraes:head-fix-directory-error-message

Conversation

@aguimaraes
Copy link
Copy Markdown
Contributor

Fixes #11485

head . incorrectly reports:

head: error writing 'standard output': Is a directory

It should report:

head: error reading '.': Is a directory

The cause: io::copy can fail from either the read or write side,but the error was always attributed to stdout via wrap_in_stdout_error.

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/date-locale-hour (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)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/basenc/bounded-memory is now passing!
Congrats! The gnu test tests/pr/bounded-memory is now passing!
Congrats! The gnu test tests/unexpand/bounded-memory is now passing!

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.

head . 's error message has wrong meaning

1 participant