Skip to content

Commit

Permalink
fix test failing
Browse files Browse the repository at this point in the history
  • Loading branch information
Songmu committed Mar 26, 2017
1 parent e1276e1 commit 0c05a0f
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions util/util_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,7 @@ func RunCommandArgs(cmdArgs []string, user string) (string, string, int, error)
if err == nil && exitStatus.IsTimedOut() {
err = fmt.Errorf("command timed out")
}

if err != nil {
if exitErr, ok := err.(*exec.ExitError); ok {
if waitStatus, ok := exitErr.Sys().(syscall.WaitStatus); ok {
exitCode := waitStatus.ExitStatus()
return stdout, stderr, exitCode, nil
}
}
return stdout, stderr, -1, err
}

return stdout, stderr, 0, nil
return stdout, stderr, exitStatus.GetChildExitCode(), err
}

// GetWmic XXX
Expand Down

0 comments on commit 0c05a0f

Please sign in to comment.