Skip to content

Conversation

natecook1000
Copy link
Member

When a required option has a short name, longer single-dash arguments can end up incorrectly colliding and causing confusing error messages. This changes the error handling when a short-name option is missing a value to show both the missing-value error and a message about the unrecognized longer/composite option.

Fixes #709.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

When a required option has a short name, longer single-dash arguments
can end up incorrectly colliding and causing confusing error messages.
This changes the error handling when a short-name option is missing
a value to show both the missing-value error _and_ a message about
the unrecognized longer/composite option.

Fixes #709.
@natecook1000 natecook1000 marked this pull request as ready for review February 13, 2025 23:04
@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000 natecook1000 requested a review from rauhul February 13, 2025 23:04
@natecook1000 natecook1000 merged commit 56d4248 into main Feb 13, 2025
21 checks passed
@natecook1000 natecook1000 deleted the single-dash-unknown-option branch February 13, 2025 23:14
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.

Confusing error output when passing a single-dash unknown option that contains some valid short label option names

1 participant