Kallin Nagelberg | 15 Jul 22:56

[groovy-user] CliBuilder inserts arguments

I am using a CliBuilder like:

CliBuilder cli = new CliBuilder(usage: usage)
cli.A(longOpt: 'mainargs', required: false, args: UNLIMITED_VALUES, 'arguments for the main method')

UNLIMITED VALUES is a constant from the Option class.

i notice when i run this from the command line like:
groovy myscript.groovy -A asdf asdf asdf asdf

There is an extra entry in the list, always at the second position:
when I do a 'println opts.As' I get:
["asdf", "--", "asdf", "asdf", "asdf"]

Is this a known issue?




Gmane