Bug 598772 - guestfish 'help' command should indicate error in exit status with an unknown command
Summary: guestfish 'help' command should indicate error in exit status with an unknown...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libguestfs
Version: 5.7
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 597145
Blocks: 598771
TreeView+ depends on / blocked
 
Reported: 2010-06-02 02:16 UTC by Jinxin Zheng
Modified: 2011-07-12 09:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 597145
Environment:
Last Closed: 2011-07-12 09:30:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jinxin Zheng 2010-06-02 02:16:15 UTC
+++ This bug was initially created as a clone of Bug #597145 +++

Description of problem:
Issueing the 'help' command in guestfish with an unknown command name exits 
with a 0 exit code.

Version-Release number of selected component (if applicable):
guestfish 1.3.17

How reproducible:
Always

Steps to Reproduce:
1. guestfish help foo
2. echo $?
3.
  
Actual results:
the exit status of guestfish is 0

Expected results:
supposed to be some other than 0 to indicate an error.

Additional info:
I wanted to use help to test the availability of some new commands in a script, 
finding that it's impossible to determine only from the exit status of guestfish.
Therefore I must test the stderr in order to work the result out.

--- Additional comment from rjones on 2010-06-01 11:31:26 EDT ---

Patch posted upstream:
https://www.redhat.com/archives/libguestfs/2010-June/msg00013.html

Please clone this bug if you want this in RHEL 5/6.  It's a relatively
simple change to backport.

Comment 1 Richard W.M. Jones 2011-07-12 09:30:08 UTC
Closing this.  It's fixed in upstream and RHEL 6 but I
highly doubt anyone cares about it in RHEL 5.


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