Bug 1033520 - CLI returns exit code 0 even when an error occurs
CLI returns exit code 0 even when an error occurs
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: CLI (Show other bugs)
4.9
Unspecified Unspecified
unspecified Severity medium (vote)
: ---
: RHQ 4.10
Assigned To: Thomas Segismont
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-22 05:02 EST by Thomas Segismont
Modified: 2014-04-23 08:29 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-23 08:29:55 EDT
Type: Bug
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 Thomas Segismont 2013-11-22 05:02:51 EST
Description of problem:
CLI returns exit code 0 even when an error occurs

Version-Release number of selected component (if applicable):
4.9 and before

How reproducible:
Always

Steps to Reproduce:
1.Execute this CLI script
===
throw "Error"
===

Actual results:
The CLI outputs a JavascriptException and return code is 0

Expected results:
The CLI outputs a JavascriptException and return code is different than 0

Additional info:
We also need to check the exit code value when:
* the user provides wrong server connection credentials
* the user provides a nonexistent or unreadable file
Comment 1 Thomas Segismont 2013-11-26 06:10:28 EST
Fixed in master

commit 204ff60c26d8a5cb48599d10b7c8b209f6e9b0c8
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Tue Nov 26 12:09:18 2013 +0100
    
In non interactive mode, exit code is 1 if :
* an error occurs while executing a command or a script
* login failed
* script file does not exist
Comment 2 Heiko W. Rupp 2014-04-23 08:29:55 EDT
Bulk closing of 4.10 issues.

If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10.

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