Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(parser): Report correct num_args on too-few #5527

Merged
merged 2 commits into from
Jun 10, 2024
Merged

Conversation

epage
Copy link
Member

@epage epage commented Jun 10, 2024

Fixes #5526

@epage epage enabled auto-merge June 10, 2024 14:17
@epage epage merged commit be2e5ca into clap-rs:master Jun 10, 2024
22 checks passed
@epage epage deleted the min branch June 10, 2024 14:24
@@ -337,7 +337,7 @@ fn write_dynamic_context(
let were_provided = singular_or_plural(*actual_num_values as usize);
let _ = write!(
styled,
"{}{min_values}{} more values required by '{}{invalid_arg}{}'; only {}{actual_num_values}{}{were_provided}",
"{}{min_values}{} values required by '{}{invalid_arg}{}'; only {}{actual_num_values}{}{were_provided}",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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.

num_args = 2.. does not error with 0 args and error has incorrect wording with 1 arg
2 participants