Bug 974308 - ipa-server-install: print unrecognized option instead of generic help
Summary: ipa-server-install: print unrecognized option instead of generic help
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: freeipa
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rob Crittenden
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-13 22:58 UTC by David Jaša
Modified: 2013-06-14 07:36 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-06-14 07:36:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description David Jaša 2013-06-13 22:58:43 UTC
Description of problem:
ipa-server-install: print unrecognized option instead of generic help

ipa-server-install invocation can easily get quite long and then it's quite hard to catch a typo that makes i-s-i print help. Printing the actual unrecognized option would be much more helpful

Version-Release number of selected component (if applicable):
freeipa-server-3.2.0-2.fc19.armv7hl

How reproducible:
always

Steps to Reproduce:
1. remove one leading '-' from some of the long options, e.g.:
ipa-server-install [...] -http_pkcs12=... [...]
2.
3.

Actual results:
i-s-i prints help screen

Expected results:
i-s-i prints something like this:
unrecognized option "-http_pkcs12=..."

Additional info:

Comment 1 Martin Kosek 2013-06-14 07:36:07 UTC
This is how Python's option parser behaves. When it hits -h/--help option, it quits parsing the command line and prints the help:

# ipa-server-install --help --some-garbage -evenmoregarbage
Usage: ipa-server-install [options]

If you had tried any other option which does not begin with "h", you would get the error as expected:

# ipa-server-install -setup-dns
Usage: ipa-server-install [options]

ipa-server-install: error: no such option: -s


I am thus closing this bug as NOTABUG as the command behaves as expected.


Note You need to log in before you can comment on or make changes to this bug.