groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pascal Schumacher (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (GROOVY-6619) Groovy command-line parser breaks when parsing '-n'
Date Tue, 02 Jun 2015 17:48:49 GMT

     [ 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)

Mime
View raw message