groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-8607) CliBuilder should ignore 'opt' property if provided within a Map of arguments
Date Sat, 26 May 2018 05:06:00 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-8607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16491510#comment-16491510
] 

ASF GitHub Bot commented on GROOVY-8607:
----------------------------------------

GitHub user paulk-asert opened a pull request:

    https://github.com/apache/groovy/pull/725

    GROOVY-8607: CliBuilder should ignore 'opt' property if provided with…

    …in a Map of arguments

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paulk-asert/groovy groovy8607

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/725.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #725
    
----
commit 0a22932c492955055b5a6065a5e8379a219579bd
Author: Daniel Sun <realbluesun@...>
Date:   2018-05-26T05:04:19Z

    GROOVY-8607: CliBuilder should ignore 'opt' property if provided within a Map of arguments

----


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