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

"is required" displayed twice in case of required option is not found #76

Closed
RecklessTodd opened this issue Feb 11, 2018 · 2 comments
Closed

Comments

@RecklessTodd
Copy link

In method App::_parse :
RequiredError(opt->single_name() + " is required");

In class RequiredError :
RequiredError(std::string name) : RequiredError(name + " is required", ExitCodes::RequiredError)

It would make sense to remove the "is required" string from App::_parse method and let it in the RequiredError() class.

RecklessTodd pushed a commit to RecklessTodd/CLI11 that referenced this issue Feb 11, 2018
…quiredError() constructor to avoid double printing.

The string "is required" is already added internally by RequiredError() class.
henryiii pushed a commit that referenced this issue Feb 12, 2018
…ror() constructor to avoid double printing.

The string "is required" is already added internally by RequiredError() class.
@henryiii
Copy link
Collaborator

Should be fixed, thanks!

@henryiii
Copy link
Collaborator

Fixed in the just-released 1.4.

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

No branches or pull requests

2 participants