karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-5568) Karaf Commands cannot have return codes
Date Fri, 02 Feb 2018 12:09:00 GMT

    [ https://issues.apache.org/jira/browse/KARAF-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16350216#comment-16350216

ASF subversion and git services commented on KARAF-5568:

Commit 36e1608f48ca469f0f2ae6110ded14d1f1a96b99 in karaf's branch refs/heads/karaf-4.1.x from
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=36e1608 ]

[KARAF-5568] support return codes in karaf commands

if the return code of an Action is an integer it is

 * no longer printed
 * used as return code for an SSH shell

> Karaf Commands cannot have return codes
> ---------------------------------------
>                 Key: KARAF-5568
>                 URL: https://issues.apache.org/jira/browse/KARAF-5568
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-shell
>    Affects Versions: 4.1.4
>            Reporter: Johannes Utzig
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 4.2.0, 4.1.5
> I've been trying to implement proper return codes for my custom karaf commands (so they
can be evaluated when called via SSH) but it seems return codes are currently not handled
> If an 'Action' returns an Integer, that integer is currently printed out on stdout in
the local shell and ignored in an SSH shell.
> I would like to submit a pull request that introduces the following changes:
>  * for SSH (ShellCommand) use the result as exitStatus if it is an integer
>  * for local shell (ConsoleSessionImpl) only print out the result it is an instance
of string

This message was sent by Atlassian JIRA

View raw message