You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Pascal Schumacher (JIRA)" <ji...@apache.org> on 2015/06/02 19:48:49 UTC

[jira] [Resolved] (GROOVY-6619) Groovy command-line parser breaks when parsing '-n'

     [ https://issues.apache.org/jira/browse/GROOVY-6619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pascal Schumacher resolved GROOVY-6619.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.5.0-beta-1

Works for me, when using current master (2.5).

> Groovy command-line parser breaks when parsing '-n'
> ---------------------------------------------------
>
>                 Key: GROOVY-6619
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6619
>             Project: Groovy
>          Issue Type: Bug
>          Components: command line processing
>    Affects Versions: 2.2.1, 2.2.2
>            Reporter: Ryan Nelson
>            Priority: Minor
>             Fix For: 2.5.0-beta-1
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)