From 95173decc6a803c06ca256e1298e55a8c1a1fdc6 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Fri, 16 Aug 2019 16:18:22 -0700 Subject: [PATCH] Update URL should be concatenated without a / --- pkg/minikube/notify/notify.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/minikube/notify/notify.go b/pkg/minikube/notify/notify.go index 5d2b0e350a64..55f09cdf9b93 100644 --- a/pkg/minikube/notify/notify.go +++ b/pkg/minikube/notify/notify.go @@ -36,8 +36,6 @@ import ( "k8s.io/minikube/pkg/version" ) -const updateLinkPrefix = "https://github.com/kubernetes/minikube/releases/tag/v" - var ( timeLayout = time.RFC1123 lastUpdateCheckFilePath = constants.MakeMiniPath("last_update_check") @@ -67,7 +65,7 @@ func MaybePrintUpdateText(url string, lastUpdatePath string) { if err := writeTimeToFile(lastUpdateCheckFilePath, time.Now().UTC()); err != nil { glog.Errorf("write time failed: %v", err) } - url := fmt.Sprintf("%s/%s", updateLinkPrefix, latestVersion) + url := "https://github.com/kubernetes/minikube/releases/tag/v" + latestVersion.String() out.ErrT(out.WarningType, `minikube {{.version}} is available! Download it: {{.url}}`, out.V{"version": latestVersion, "url": url}) out.T(out.Tip, "To disable this notice, run: 'minikube config set WantUpdateNotification false'") }