Skip to content

Commit

Permalink
Enhance the error messages returned by minikube to include the comman…
Browse files Browse the repository at this point in the history
…d that was run (#295)
  • Loading branch information
spew authored and k8s-ci-robot committed Jun 7, 2018
1 parent f05ed08 commit 405008c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clusterctl/clusterdeployer/minikube/minikube.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"io/ioutil"
"os"
"os/exec"
"strings"
)

type Minikube struct {
Expand All @@ -31,6 +32,9 @@ var minikubeExec = func(env []string, args ...string) (string, error) {
cmd.Env = env
cmdOut, err := cmd.CombinedOutput()
glog.V(2).Infof("Ran: %v %v Output: %v", executable, args, string(cmdOut))
if err != nil {
err = fmt.Errorf("error running command '%v %v': %v", executable, strings.Join(args, " "), err)
}
return string(cmdOut), err
}

Expand Down

0 comments on commit 405008c

Please sign in to comment.