Skip to content

Support exclusive access to exit code, output and error streams #29

@ganapatib

Description

@ganapatib

Problem

Running the following code: Jash jash = Jash.start("docker", "version").withAnyExitCode(), I want to access the exit code, stdout and std error streams to provide helpful information to the user for the next steps. For example, if the error output contains permission denied, the user needs to use sudo. If it contains a connection error, the user needs to start the Docker daemon. Currently, I can only access one of them, and invoking anything else would throw a Stream closed exception.

Right now, my workaround is to also search for strings in the output if the command ran successfully. If this is available, I would just do exitCode == 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions