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

No error message about invalid arguments when providing --help #1010

Open
Garados007 opened this issue Feb 20, 2024 · 1 comment
Open

No error message about invalid arguments when providing --help #1010

Garados007 opened this issue Feb 20, 2024 · 1 comment

Comments

@Garados007
Copy link

If the user specifies invalid arguments and --help, CLI11 produces only a help message and no error message. I would expect an error message and then the help. Just like this:

$ git push --help --invalidasdasdasd
error: unknown option `invalidasdasdasd'
usage: git help [-a|--all] [--[no-]verbose] [--[no-]external-commands] [--[no-]aliases]
... more of help ...

Is there an option to enable this?

@phlptp
Copy link
Collaborator

phlptp commented Feb 20, 2024

In the current error handling mechanism help takes precedence. Not doing it this way would cause all sorts of other problems. We are starting to explore potential options to move away from exceptions in the error handling which potentially could enable something like this. See #984

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