Red Hat Bugzilla – Bug 598771
guestfish 'help' command should indicate error in exit status with an unknown command
Last modified: 2010-11-10 16:02:57 EST
+++ 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):
Steps to Reproduce:
1. guestfish help foo
2. echo $?
the exit status of guestfish is 0
supposed to be some other than 0 to indicate an error.
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 firstname.lastname@example.org 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.
Scratch build for RHEL 6 here:
I have tested this build on RHEL 6 and it works.
Patch posted and ACKed here:
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
# 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.
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.