groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GROOVY-8759) groovy.cli.picocli.CliBuilder should behave like cli.commons.CliBuilder on invalid options
Date Tue, 21 Aug 2018 00:26:00 GMT
Remko Popma created GROOVY-8759:
-----------------------------------

             Summary: 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
             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)

Mime
View raw message