Bug 598771 - guestfish 'help' command should indicate error in exit status with an unknown command
guestfish 'help' command should indicate error in exit status with an unknown...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs (Show other bugs)
6.1
All Linux
low Severity low
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
:
Depends On: 597145 598772
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-01 22:14 EDT by Jinxin Zheng
Modified: 2010-11-10 16:02 EST (History)
4 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Jinxin Zheng 2010-06-01 22:14:25 EDT
+++ 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@redhat.com 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 2 Richard W.M. Jones 2010-06-03 04:56:54 EDT
Scratch build for RHEL 6 here:
https://brewweb.devel.redhat.com/taskinfo?taskID=2489956

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

Patch posted and ACKed here:
http://post-office.corp.redhat.com/archives/rhvirt-patches/2010-June/msg00061.html
Comment 3 RHEL Product and Program Management 2010-06-07 12:01:48 EDT
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
inclusion.
Comment 8 Jinxin Zheng 2010-07-16 01:09:42 EDT
# guestfish help launch >/dev/null 
# echo $?
0

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

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

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 16:02:57 EST
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.