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

[cli] argument defaults prevent commandline usage.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: CLI-2.x
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

    • Bugzilla Id:
      39335

      Description

      I have found a bug in the following scenario:

      You have an option which can take a single argument which in turn has a default
      value. You supply a value on the command line which is intended to override
      this default however as the CommandLine already has a value for this Option,
      this second value is not allowed and the command line cannot be parsed.

      I have created a patch which adds a method to WritableCommandLine and its Impl
      which allows you to retrieve the undefaulted values for an Option. I have then
      changed ArgumentImpl to use this method to determine the argument count

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              aks Andrew Shirley
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: