func runCommandWithOutput(cmd *exec.Cmd) (output string, exitCode int, err error) { exitCode = 0 out, err := cmd.CombinedOutput() exitCode = system.ProcessExitCode(err) output = string(out) return }
// SetExitError sets Error and ExitCode based on Error func (r *Result) SetExitError(err error) { if err == nil { return } r.Error = err r.ExitCode = system.ProcessExitCode(err) }