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/12/13 10:06:04 UTC

[jira] [Closed] (GROOVY-8759) groovy.cli.picocli.CliBuilder should behave like cli.commons.CliBuilder on invalid options

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

Paul King closed GROOVY-8759.
-----------------------------

> groovy.cli.picocli.CliBuilder should behave like cli.commons.CliBuilder on invalid options
> ------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-8759
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8759
>             Project: Groovy
>          Issue Type: Dependency upgrade
>          Components: command line processing
>    Affects Versions: 2.5.2
>            Reporter: Remko Popma
>            Assignee: Remko Popma
>            Priority: Major
>             Fix For: 2.5.3
>
>
> When {{stopAtNonOption: false}} flag is set, the two versions of CliBuilder behave differently. (See GROOVY-8740)
> The commons cli version of CliBuilder returns {{null}}:
> {code}
> def optCommons = new groovy.cli.commons.CliBuilder(stopAtNonOption: false).parse(['-x'])
> if (optCommons) println "Okay" else println "Error"
> {code}
> The picocli version of CliBuilder returns a non-null options object with the {{"-x"}} value as a positional parameter:
> {code}
> def optCli = new groovy.cli.picocli.CliBuilder(stopAtNonOption: false).parse(['-x'])
> if (optCli) println "Okay" else println "Error"
> {code}



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