From c610deaa43a201f7b35d036a65428ab1a7e8e2d5 Mon Sep 17 00:00:00 2001 From: Aaron Prindle Date: Wed, 18 Jan 2017 10:46:09 -0800 Subject: [PATCH] Fixed kubectl download text/check for Windows --- cmd/util/util.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/util/util.go b/cmd/util/util.go index 07a9b408e3f4..6144c38925a8 100644 --- a/cmd/util/util.go +++ b/cmd/util/util.go @@ -177,11 +177,16 @@ func MaybePrintKubectlDownloadMsg() { if runtime.GOOS == "windows" { verb = "do" installInstructions = `download kubectl from: -https://storage.googleapis.com/kubernetes-release/release/%s/bin/%s/%s/kubectl +https://storage.googleapis.com/kubernetes-release/release/%s/bin/%s/%s/kubectl.exe Add kubectl to your system PATH` } - _, err := exec.LookPath("kubectl") + var err error + if runtime.GOOS == "windows" { + _, err = exec.LookPath("kubectl.exe") + } else { + _, err = exec.LookPath("kubectl") + } if err != nil { fmt.Fprintf(os.Stderr, `========================================