[ https://issues.apache.org/jira/browse/KARAF-2623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13917823#comment-13917823 ]
ASF GitHub Bot commented on KARAF-2623: --------------------------------------- GitHub user grgrzybek opened a pull request: https://github.com/apache/karaf/pull/31 [KARAF-2623] return non-zero exit status in case of remote cmd exception You can merge this pull request into a Git repository by running: $ git pull https://github.com/grgrzybek/karaf KARAF-2623-3.0.x Alternatively you can review and apply these changes as the patch at: https://github.com/apache/karaf/pull/31.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #31 ---- commit 5d49ab564d5e9da09acd1a33f1872c9a6b7c8bc7 Author: Grzegorz Grzybek <gr.grzy...@gmail.com> Date: 2014-03-03T08:09:42Z [KARAF-2623] return non-zero exit status in case of remote cmd exception ---- > Karaf client script only returns a non zero status if there is exception > ------------------------------------------------------------------------ > > Key: KARAF-2623 > URL: https://issues.apache.org/jira/browse/KARAF-2623 > Project: Karaf > Issue Type: Improvement > Affects Versions: 2.3.0 > Reporter: Jason Sherman > Priority: Minor > > When connecting to karaf using the client script and executing commands a non > zero return code is only returned if an exception occurs, however it would be > useful to return a non zero return for other errors as well. > For example if the following command is run a non zero return code is > returned: > {code} > [jsherman@oxygen bin]$ ./client -u admin -p admin1 features:install wrapper > Authentication failure > [jsherman@oxygen bin]$ echo $? > 1 > {code} > However, the following command also had a failure but the client script > returns zero indicating it was successful: > {code} > [jsherman@oxygen bin]$ ./client -u admin -p admin features:install wraper > Error executing command: No feature named 'wraper' with version '0.0.0' > available > [jsherman@oxygen bin]$ echo $? > 0 > [jsherman@oxygen bin]$ > {code} > It would be nice to know that command resulted in an error. -- This message was sent by Atlassian JIRA (v6.2#6252)