karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (KARAF-5568) Karaf Commands cannot have return codes
Date Tue, 16 Jan 2018 17:19:00 GMT

     [ https://issues.apache.org/jira/browse/KARAF-5568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Guillaume Nodet reassigned KARAF-5568:

    Assignee: Guillaume Nodet

> 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: Guillaume Nodet
>            Priority: Major
> 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