picocli
picocli copied to clipboard
Misleading error message "Unknown options: '--option', 'value'"
Based on feedback from https://github.com/keycloak/keycloak/issues/10051
When we have user input like --xxx somevalue
, and there is no option named --xxx
, then picocli also does not know what to do with the somevalue
parameter. The error message says "Unknown options", but perhaps this should be refined to:
- only say "Unknown options" when all unmatched arguments resemble options
- say "Unknown arguments" when none of the unmatched arguments resemble an option
- say "Unknown options and arguments" when some but not all of the unmatched arguments resemble an option