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

Required argument empty checking not working with equals specified long option

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.4
    • None
    • CLI-1.x
    • None
    • OS: macOS 10.14.6

      Java: Corretto-8.212.04.2 (build 1.8.0_212-b04)

    Description

      When an option taking an argument is specified with a space the blank checking works:

      $ CheckEmpty --widget-count
      org.apache.commons.cli.MissingArgumentException: Missing argument for option: widget-count
      

       However when using the equals sign as a separator that checking does not seem to apply

      $ CheckEmpty --widget-count=
      Received widget count of:
      

      I'd expect it to throw an exception just like the space separated variety.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ftclausen Friedrich Clausen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: