Bug 598771 - 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...
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs   
(Show other bugs)
Version: 6.1
Hardware: All Linux
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
Depends On: 597145 598772
TreeView+ depends on / blocked
Reported: 2010-06-02 02:14 UTC by Jinxin Zheng
Modified: 2010-11-10 21:02 UTC (History)
4 users (show)

Fixed In Version: libguestfs-1.2.7-1.11.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 597145
Last Closed: 2010-11-10 21:02:57 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Jinxin Zheng 2010-06-02 02:14:25 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:

Steps to Reproduce:
1. guestfish help foo
2. echo $?
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@redhat.com on 2010-06-01 11:31:26 EDT ---

Patch posted upstream:

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

Comment 2 Richard W.M. Jones 2010-06-03 08:56:54 UTC
Scratch build for RHEL 6 here:

I have tested this build on RHEL 6 and it works.

Patch posted and ACKed here:

Comment 3 RHEL Product and Program Management 2010-06-07 16:01:48 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 8 Jinxin Zheng 2010-07-16 05:09:42 UTC
# guestfish help launch >/dev/null 
# echo $?

# guestfish help help >/dev/null 
# echo $?

# guestfish help blahblah >/dev/null 
blahblah: command not known, use -h to list all commands
# echo $?

guestfish help with non-existent command returns with the exit status 1, so move this bug to VERIFIED.

Comment 9 releng-rhel@redhat.com 2010-11-10 21:02:57 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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