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/26 03:01:00 UTC
[jira] [Created] (GROOVY-8607) CliBuilder should ignore 'opt'
property if provided within a Map of arguments
Paul King created GROOVY-8607:
---------------------------------
Summary: 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
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)