Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.2.1, 2.2.2
-
None
Description
Here's a simplified script that exposes the error:
args.each
{ println it }def cli = new CliBuilder(usage: '...usage...')
cli.n(args: 1, 'The name')
def options = cli.parse(args)
println ":" + options.n
Run the program with: groovy test.groovy -n name
Using Groovy 2.1.7, I get the expected response:
-n
name
:name
Using Groovy 2.2.2, I get something strange:
?
name
:false
Using -n also breaks any subsequent options passed on the same command line.