You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2018/05/27 02:59:00 UTC
[jira] [Resolved] (GROOVY-8607) CliBuilder should ignore 'opt'
property if provided within a Map of arguments
[ 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)