Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-164

PosixParser ignores unrecognized tokens starting with '-'

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2
    • Component/s: Parser
    • Labels:
      None

      Description

      PosixParser doesn't handle properly unrecognized tokens starting with '-' when stopAtNonOption is enabled, the token is simply ignored.

      For example, if the option 'a' is defined, the following command line:

      -z -a foo

      is interpreted as:

      -a foo

        Activity

        Hide
        ebourg Emmanuel Bourg added a comment -

        Actually, the option is ignored even if stopAtNonOption is disabled, no exception is thrown.

        Show
        ebourg Emmanuel Bourg added a comment - Actually, the option is ignored even if stopAtNonOption is disabled, no exception is thrown.

          People

          • Assignee:
            ebourg Emmanuel Bourg
            Reporter:
            ebourg Emmanuel Bourg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development