Skip to content

do we need a cmd.Error() function? #41

@jstrachan

Description

@jstrachan

When running a command inside a Shell like this:
https://github.com/fabric8io/kansible/blob/master/winrm/winrm.go#L59-L71

    var cmd *winrm.Command
    cmd, err = shell.Execute(commandText)
    if err != nil {
        return fmt.Errorf("Impossible to create Command %s\n", err)
    }

    go io.Copy(cmd.Stdin, os.Stdin)
    go io.Copy(os.Stdout, cmd.Stdout)
    go io.Copy(os.Stderr, cmd.Stderr)

    cmd.Wait()

I didn't see a way to get the error from the command after the Wait()? I can get the ExitCode though I guess.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions