From 18a7f4c6b57ffcbf03fbb653c8d2765b23cd758c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Mon, 23 Sep 2019 20:13:06 +0200 Subject: [PATCH] Fix order of parameters to CurrentContext funcs Apparently it is easy to get name and path swapped around. --- cmd/minikube/cmd/config/profile.go | 2 +- cmd/minikube/cmd/stop.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/minikube/cmd/config/profile.go b/cmd/minikube/cmd/config/profile.go index 4842ec5345e2..8c59829840bc 100644 --- a/cmd/minikube/cmd/config/profile.go +++ b/cmd/minikube/cmd/config/profile.go @@ -71,7 +71,7 @@ var ProfileCmd = &cobra.Command{ out.SuccessT("Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.", out.V{"profile_name": profile}) out.SuccessT("To connect to this cluster, use: kubectl --context={{.profile_name}}", out.V{"profile_name": profile}) } else { - err := kubeconfig.SetCurrentContext(constants.KubeconfigPath, profile) + err := kubeconfig.SetCurrentContext(profile, constants.KubeconfigPath) if err != nil { out.ErrT(out.Sad, `Error while setting kubectl current context : {{.error}}`, out.V{"error": err}) } diff --git a/cmd/minikube/cmd/stop.go b/cmd/minikube/cmd/stop.go index c8688bcbaeb6..13efef007904 100644 --- a/cmd/minikube/cmd/stop.go +++ b/cmd/minikube/cmd/stop.go @@ -77,7 +77,7 @@ func runStop(cmd *cobra.Command, args []string) { } machineName := pkg_config.GetMachineName() - err = kubeconfig.UnsetCurrentContext(constants.KubeconfigPath, machineName) + err = kubeconfig.UnsetCurrentContext(machineName, constants.KubeconfigPath) if err != nil { exit.WithError("update config", err) }