Bug 873601 - Even with unknown command subcription-manager returns exit code 0
Summary: Even with unknown command subcription-manager returns exit code 0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.10
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 5.10
Assignee: candlepin-bugs
QA Contact: IDM QE LIST
URL:
Whiteboard:
: 908662 (view as bug list)
Depends On:
Blocks: rhsm-rhel510 841211 rhsm-2013
TreeView+ depends on / blocked
 
Reported: 2012-11-06 09:44 UTC by Miroslav Suchý
Modified: 2013-09-30 22:50 UTC (History)
6 users (show)

Fixed In Version: 1.8.2
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2013-09-30 22:50:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1332 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-09-30 22:49:24 UTC

Description Miroslav Suchý 2012-11-06 09:44:49 UTC
Description of problem:
Run subscription-manager with unknow command. It print help page and exit with zero exit code. While I would assume non zero exit code.

Version-Release number of selected component (if applicable):
subscription-manager-1.1.3-1.fc17.x86_64

How reproducible:
deterministc

Steps to Reproduce:
1. run "subscription-manager foo"
2. run "echo $?"
  
Actual results:
0

Expected results:
1

Comment 2 Bryan Kearney 2012-12-20 19:38:02 UTC
commit d6cb812efcb35ba547ba595e3a39f14064ea4b72
Author: Bryan Kearney <bkearney>
Date:   Thu Dec 20 13:32:50 2012 -0500

    873601: Return a non zero code if subscription manager is run with an incorrect command name

Comment 3 Bryan Kearney 2013-02-08 17:18:50 UTC
Fixed in the 1.8.2 version of subscription-manager or python-rhsm

Comment 4 Bryan Kearney 2013-02-08 20:11:00 UTC
*** Bug 906124 has been marked as a duplicate of this bug. ***

Comment 5 Bryan Kearney 2013-02-08 20:41:03 UTC
*** Bug 908662 has been marked as a duplicate of this bug. ***

Comment 6 Shwetha Kallesh 2013-02-11 08:09:10 UTC
Verifying version

[root@rhel7 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.7.24-1
subscription-manager: 1.8.2-1.el7
python-rhsm: 1.8.2-1.el7


[root@rhel7 ~]# subscription-manager foo
Usage: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]

[root@rhel7 ~]# echo $?
1


Marking verified!!

Comment 7 RHEL Program Management 2013-04-09 19:59:56 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 9 errata-xmlrpc 2013-09-30 22:50:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1332.html


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