You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/06/22 15:13:00 UTC
[jira] [Commented] (CLI-253) Unrecognized option: --null
[ https://issues.apache.org/jira/browse/CLI-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14595892#comment-14595892 ]
ASF GitHub Bot commented on CLI-253:
------------------------------------
GitHub user msrb opened a pull request:
https://github.com/apache/commons-cli/pull/3
[CLI-253] Prevent "Unrecognized option: --null" when handling long opts in PosixParser
Attempt to fix [CLI-253].
[CLI-253]: https://issues.apache.org/jira/browse/CLI-253
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/msrb/commons-cli cli-253
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-cli/pull/3.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 #3
----
commit 77218790904f40395304669f5d79740f459c0a90
Author: Michal Srb <ms...@redhat.com>
Date: 2015-06-22T13:01:30Z
[CLI-253] Prevent "Unrecognized option: --null" when handling long opts in PosixParser
----
> Unrecognized option: --null
> ---------------------------
>
> Key: CLI-253
> URL: https://issues.apache.org/jira/browse/CLI-253
> Project: Commons CLI
> Issue Type: Bug
> Components: CLI-1.x
> Affects Versions: 1.3, 1.3.1
> Reporter: Michal Srb
>
> groovy project uses commons-cli in following way:
>
> {code:java}
> options.addOption(OptionBuilder.hasArg().withArgName("path").withDescription("Specify where to find the class files - must be first argument").create("classpath"));
> options.addOption(OptionBuilder.withLongOpt("classpath").hasArg().withArgName("path").withDescription("Aliases for '-classpath'").create("cp"));
> {code}
> https://github.com/groovy/groovy-core/blob/GROOVY_1_8_X/src/main/org/codehaus/groovy/tools/FileSystemCompiler.java#L297-L298
> When called with long option "--classpath ...", it throws exception:
> org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: --null
> Same code works fine with commons-cli 1.2.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)