Hey remko and picocli team :)
Our Keycloak CLI implementation evolved a bit, and now we are facing a likely minor issue, nevertheless I wanted to reach out to you all to ask for advice:
In general, it is possible to provide an option to some commands in our CLI like so:
kc.sh <command> --<optionkey>=<value>
Now when there's a typo in the key, the error message always shows "Unknown option: <optionkey>=<value>".
This leads in some cases to e.g. a database password being leaked to the console, and thus possibly to logs, which should not happen. That's exactly the use case we have atm, so I searched around but have not found a way to set a handler for the UnmatchedArgumentException, as it is possible for e.g. ExecutionException or ParameterException.
So, my question for now would be: Is there actually a way I miss to show only the key of the unknown option instead of key=value? so when I e.g. run kc.sh start-dev --db-pasword=foo the output would be just "Unknown option: --db-pasword"?
Would love to hear from you.
Thanks and best regards,
Dominik