From 405008c06ce7d80627bd9bf0588ff49789711026 Mon Sep 17 00:00:00 2001 From: Rob Leidle Date: Thu, 7 Jun 2018 09:13:23 -0700 Subject: [PATCH] Enhance the error messages returned by minikube to include the command that was run (#295) --- clusterctl/clusterdeployer/minikube/minikube.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clusterctl/clusterdeployer/minikube/minikube.go b/clusterctl/clusterdeployer/minikube/minikube.go index 25121c9f2ef1..9eda23e9eb8c 100644 --- a/clusterctl/clusterdeployer/minikube/minikube.go +++ b/clusterctl/clusterdeployer/minikube/minikube.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "os" "os/exec" + "strings" ) type Minikube struct { @@ -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 }