Closed rhys-saldanha closed 1 year ago
It seems that there is an option for this in picocli: command.setCaseInsensitiveEnumValuesAllowed(true);
So I will try this out soon, and make a fix before making the release (0.19.3) this weekend.
I think the configuration needed is:
https://picocli.info/apidocs/picocli/CommandLine.html#setOptionsCaseInsensitive-boolean- https://picocli.info/apidocs/picocli/CommandLine.html#setSubcommandsCaseInsensitive-boolean-
That is correct, and also the way I solved it for both the Server and Booter: 🙂 https://github.com/robocode-dev/tank-royale/blob/master/server/src/main/kotlin/Server.kt https://github.com/robocode-dev/tank-royale/blob/master/booter/src/main/kotlin/dev/robocode/tankroyale/booter/Booter.kt
I made a new release on Friday with these fixes, and I did change the botSecrets
and controllerSecrets
into bot-secrets
and controller-secrets
to be consistent with the other command-line commands and options.
The more involved approach would've been to figure out how to configure pico-cli to be case insensitive, if that's a preferred approach? At least for now, the documentation matches the current behaviour.