Bug 1033520 - CLI returns exit code 0 even when an error occurs
Summary: CLI returns exit code 0 even when an error occurs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: RHQ 4.10
Assignee: Thomas Segismont
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-22 10:02 UTC by Thomas Segismont
Modified: 2014-04-23 12:29 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-04-23 12:29:55 UTC
Embargoed:


Attachments (Terms of Use)

Description Thomas Segismont 2013-11-22 10:02:51 UTC
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 11:10:28 UTC
Fixed in master

commit 204ff60c26d8a5cb48599d10b7c8b209f6e9b0c8
Author: Thomas Segismont <tsegismo>
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 12:29:55 UTC
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.