groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (GROOVY-8607) CliBuilder should ignore 'opt' property if provided within a Map of arguments
Date Sun, 27 May 2018 02:59:00 GMT

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

Paul King resolved GROOVY-8607.
-------------------------------
    Resolution: Fixed
      Assignee: Paul King

Proposed PR merged.

> CliBuilder should ignore 'opt' property if provided within a Map of arguments
> -----------------------------------------------------------------------------
>
>                 Key: GROOVY-8607
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8607
>             Project: Groovy
>          Issue Type: Improvement
>    Affects Versions: 2.5.0-rc-3
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 2.5.0
>
>
> {code}
> println "groovy version = ${GroovySystem.getVersion()}"
> def builder = new CliBuilder()
> def opt1 = [opt:'x']
> builder."${opt1.opt ?: '_'}"(opt1, 'desc opt1')  // problem is here
> def opt2 = [opt:'y',longOpt:'why']
> builder."${opt2.opt ?: '_'}"(opt2, 'desc opt1')  // problem is here
> def opt3 = [opt:'z',longOpt:'zed',argName:'arg',args:1]
> builder."${opt3.opt ?: '_'}"(opt3, 'desc opt3')  // problem is here
> def opt4 = [longOpt:'quiet']
> builder."${opt4.opt ?: '_'}"(opt4, 'desc opt:')  // problem is here
> println builder.options
> builder.usage()
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message