commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Egge (JIRA)" <>
Subject [jira] Commented: (CLI-148) arguments are interpreted as options
Date Fri, 14 Sep 2007 20:58:32 GMT


Brian Egge commented on CLI-148:

Hi Matt,

This is a limitation of the CLI 1.x parser, and I don't think it would be possible to fix
without breaking a lot of existing code and test cases.  However, there are a couple of work

1) Don't include a space between the option and the arg.
2) Enclose the arg in quotes

I've attached a test case showing examples of the above two methods.

> arguments are interpreted as options
> ------------------------------------
>                 Key: CLI-148
>                 URL:
>             Project: Commons CLI
>          Issue Type: Bug
>          Components: CLI-1.x
>    Affects Versions: 1.1
>         Environment: Debian stable x86 with Sun JDK 1.6.0_02
>            Reporter: Matt Ray
>            Priority: Minor
> related to
> The command-line parser interprets arguments to options as options if they match existing
options.  Example:
> Assume
> -a arg
> -b arg
> -a b -b a was fixed in CLI-71, but
> -a "-b" returns 
> Unable to parse command line: no argument for:a
> -a "-c" is OK if "-c" is not defined as an option.
> The option in my case was "-password" and their password happened to match one of the

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message