Details
-
Dependency upgrade
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.5.2
-
None
Description
When stopAtNonOption: false flag is set, the two versions of CliBuilder behave differently. (See GROOVY-8740)
The commons cli version of CliBuilder returns null:
def optCommons = new groovy.cli.commons.CliBuilder(stopAtNonOption: false).parse(['-x']) if (optCommons) println "Okay" else println "Error"
The picocli version of CliBuilder returns a non-null options object with the "-x" value as a positional parameter:
def optCli = new groovy.cli.picocli.CliBuilder(stopAtNonOption: false).parse(['-x']) if (optCli) println "Okay" else println "Error"
Attachments
Issue Links
- relates to
-
GROOVY-8740 groovy.util.CliBuilder doesn't handle parse errors correctly
- Closed