[
https://issues.apache.org/jira/browse/CLI-297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Friedrich Clausen updated CLI-297:
----------------------------------
Description:
When an option taking an argument is specified with a space the blank checking
works:
{code:none}
$ CheckEmpty --widget-count
org.apache.commons.cli.MissingArgumentException: Missing argument for option:
widget-count
{code}
However when using the equals sign as a separator that checking does not seem
to apply
{code:none}
$ CheckEmpty --widget-count=
Received widget count of:
{code}
I'd expect it to throw an exception just like the space separated variety.
was:
When an option taking an argument is specified with a space the blank checking
works:
{code:none}
$ CheckEmpty --widget-count
org.apache.commons.cli.MissingArgumentException: Missing required option:
widget-count
{code}
However when using the equals sign as a separator that checking does not seem
to apply
{code:none}
$ CheckEmpty --widget-count=
Received widget count of:
{code}
I'd expect it to throw an exception just like the space separated variety.
> Required argument empty checking not working with equals specified long option
> ------------------------------------------------------------------------------
>
> Key: CLI-297
> URL: https://issues.apache.org/jira/browse/CLI-297
> Project: Commons CLI
> Issue Type: Bug
> Components: CLI-1.x
> Affects Versions: 1.4
> Environment: OS: macOS 10.14.6
> Java: Corretto-8.212.04.2 (build 1.8.0_212-b04)
> Reporter: Friedrich Clausen
> Priority: Minor
>
> When an option taking an argument is specified with a space the blank
> checking works:
> {code:none}
> $ CheckEmpty --widget-count
> org.apache.commons.cli.MissingArgumentException: Missing argument for option:
> widget-count
> {code}
> However when using the equals sign as a separator that checking does not
> seem to apply
> {code:none}
> $ CheckEmpty --widget-count=
> Received widget count of:
> {code}
> I'd expect it to throw an exception just like the space separated variety.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)