picocli icon indicating copy to clipboard operation
picocli copied to clipboard

Misleading error message "Unknown options: '--option', 'value'"

Open remkop opened this issue 3 years ago • 0 comments

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

remkop avatar Feb 08 '22 01:02 remkop