pki-bot / pki-issues-final

0 stars 0 forks source link

RFE: Consider replacing CLI command-line parser to account equally for arguments and options #975

Open pki-bot opened 3 years ago

pki-bot commented 3 years ago

This issue was migrated from Pagure Issue #982. Originally filed by rpattath (@rpattath) on 2014-04-28 21:16:31:


[root@sigma dogtag]# pki group-add

Error: Missing required option: description
usage: group-add <Group ID> [OPTIONS...]
    --description <description>   Description
    --help                        Show help options

Missing is not reported.

pki-bot commented 3 years ago

Comment from mharmsen (@mharmsen) at 2014-04-29 00:26:31

As discussed on IRC, this would more than likely require a change to the way that the command-line is currently parsed by the CLI tools (possibly using some classes other than the Apache Commons CLI Options/Option classes).

Currently, the following procedures are followed:

proposed milestone: 10.3

pki-bot commented 3 years ago

Comment from edewata (@edewata) at 2014-04-29 19:48:34

It might be possible to fix this by making the options optional during parsing, then checking for required options manually after that.

So the steps are:

pki-bot commented 3 years ago

Comment from nkinder (@nkinder) at 2014-05-05 19:41:58

What happens if you specify the "description", but only leave out the "Group ID"? I'd like to see the actual message.

pki-bot commented 3 years ago

Comment from mharmsen (@mharmsen) at 2014-05-05 22:57:22

Replying to [comment:4 nkinder]:

What happens if you specify the "description", but only leave out the "Group ID"? I'd like to see the actual message.

If a "--description " were specified, the following message would be returned:

Error: No Group ID specified.
usage: group-add <Group ID> [OPTIONS...]
    --description <description>   Description
    --help                        Show help options

As explained above, this behavior is exactly as described above.

However, rather than closing this ticket, I am going to re-title it and move it to 10.4.

pki-bot commented 3 years ago

Comment from rpattath (@rpattath) at 2017-02-27 13:58:13

Metadata Update from @rpattath: