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

Improve error message for usageHelp and versionHelp validation #350

Closed
remkop opened this issue Apr 11, 2018 · 0 comments
Closed

Improve error message for usageHelp and versionHelp validation #350

remkop opened this issue Apr 11, 2018 · 0 comments

Comments

@remkop
Copy link
Owner

remkop commented Apr 11, 2018

Current output when misconfigured:

Exception in thread "main" picocli.CommandLine$InitializationException: Non-boolean options (like -s) should not be marked as 'usageHelp=true'.
	at picocli.CommandLine$Model$CommandSpec.validate(CommandLine.java:2760)
	at picocli.CommandLine$Model$CommandReflection.extractCommandSpec(CommandLine.java:4026)
...

A more user-friendly error message could look like this:

Non-boolean options like [--serviceName, --connection, --rfafile, --username] should not be marked as 'usageHelp=true'. Usually a command only has one --help option that triggers display of the usage help message. Alternatively, consider using @Command(mixinStandardHelpOptions = true) on your command instead.

@remkop remkop added this to the 3.0 milestone Apr 11, 2018
@remkop remkop closed this as completed in 3358705 Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant