Created
September 1, 2017 21:15
-
-
Save thrawn01/4d25aa9b9b1bcef8bc0e3c1a87b17583 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/cmd/start.go b/cmd/start.go | |
| index 0666e58..b7aa35b 100644 | |
| --- a/cmd/start.go | |
| +++ b/cmd/start.go | |
| @@ -96,7 +96,7 @@ func runConfig(ctx *cli.Context, r *util.RuntimeEnv) error { | |
| r.Exec("minikube", "config", "set", "cpus", ctx.String("cpus")) | |
| r.Exec("minikube", "config", "set", "disk-size", ctx.String("disk")) | |
| r.Exec("minikube", "config", "set", "vm-driver", r.VirtDriver) | |
| - r.Exec("minikube", "config", "set", "kubernetes-version", ctx.String("k8s-version")) | |
| + //r.Exec("minikube", "config", "set", "kubernetes-version", ctx.String("k8s-version")) | |
| r.Exec("minikube", "config", "set", "WantReportErrorPrompt", "false") | |
| r.Exec("minikube", "config", "set", "WantUpdateNotification", "false") | |
| @@ -169,7 +169,6 @@ func runMinikube(ctx *cli.Context, r *util.RuntimeEnv) error { | |
| } | |
| - | |
| return nil | |
| } | |
| diff --git a/cmd/tools.go b/cmd/tools.go | |
| index 98be6ee..2156d00 100644 | |
| --- a/cmd/tools.go | |
| +++ b/cmd/tools.go | |
| @@ -236,7 +236,7 @@ func pullMinikube(r *util.RuntimeEnv) error { | |
| const ( | |
| srcUrl = "https://storage.googleapis.com/minikube/releases/%s/minikube-%s-amd64" | |
| - version = "v0.18.0" | |
| + version = "v0.21.0" | |
| ) | |
| dest := path.Join(r.BinDir, "minikube") | |
| diff --git a/util/env.go b/util/env.go | |
| index 48cdfd3..2f0e4a4 100644 | |
| --- a/util/env.go | |
| +++ b/util/env.go | |
| @@ -21,7 +21,7 @@ import ( | |
| ) | |
| const ( | |
| - minikubeStatusReStr = "^minikubeVM: ([^\n]+)" | |
| + minikubeStatusReStr = "^minikube: ([^\n]+)" | |
| ) | |
| var ( | |
| @@ -342,9 +342,12 @@ func (r *RuntimeEnv) MinikubeStatus() (string, error) { | |
| } | |
| output := state.Out.String() | |
| - vmStatus := minikubeStatusRegexp.FindStringSubmatch(output)[1] | |
| + match := minikubeStatusRegexp.FindStringSubmatch(output) | |
| + if len(match) != 2 { | |
| + return "", errors.Wrapf(err, "Unable to extract status from `minikube status` output") | |
| + } | |
| - return vmStatus, nil | |
| + return match[1], nil | |
| } | |
| func (r *RuntimeEnv) IsMinikubeRunning() bool { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment