You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2018/08/21 00:26:00 UTC
[jira] [Created] (GROOVY-8759) groovy.cli.picocli.CliBuilder should
behave like cli.commons.CliBuilder on invalid options
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)