Skip to content

Conversation

@ChrisDryden
Copy link
Collaborator

The coreutils multicall binary doesn't use clap for argument parsing - it manually handles a few known options (--list, --version, --help) and treats everything else as a utility name.

When given an unrecognized option like --unknown or -/, it was outputting:

--unknown: function/utility not found

This was causing the usage_vs_getopt.sh GNU test to fail because it expects the standard error format:

coreutils: unrecognized option '--unknown'

This PR adds detection for option-like arguments (starting with -) and outputs the proper error message.

@ChrisDryden ChrisDryden changed the title coreutils: output proper error for unrecognized options coreutils: output expected error for unrecognized options Dec 26, 2025
@github-actions
Copy link

GNU testsuite comparison:

Note: The gnu test tests/pr/pr-tests was skipped on 'main' but is now failing.

@ChrisDryden ChrisDryden force-pushed the coreutils-unrecognized-option branch from dd4938b to 155a215 Compare December 26, 2025 20:52
@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/usage_vs_getopt (passes in this run but fails in the 'main' branch)

@ChrisDryden ChrisDryden marked this pull request as ready for review December 26, 2025 22:16
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.

2 participants