Skip to content

Commit 18a7f4c

Browse files
committed
Fix order of parameters to CurrentContext funcs
Apparently it is easy to get name and path swapped around.
1 parent 668ea9a commit 18a7f4c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cmd/minikube/cmd/config/profile.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ var ProfileCmd = &cobra.Command{
7171
out.SuccessT("Skipped switching kubectl context for {{.profile_name}} because --keep-context was set.", out.V{"profile_name": profile})
7272
out.SuccessT("To connect to this cluster, use: kubectl --context={{.profile_name}}", out.V{"profile_name": profile})
7373
} else {
74-
err := kubeconfig.SetCurrentContext(constants.KubeconfigPath, profile)
74+
err := kubeconfig.SetCurrentContext(profile, constants.KubeconfigPath)
7575
if err != nil {
7676
out.ErrT(out.Sad, `Error while setting kubectl current context : {{.error}}`, out.V{"error": err})
7777
}

cmd/minikube/cmd/stop.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func runStop(cmd *cobra.Command, args []string) {
7777
}
7878

7979
machineName := pkg_config.GetMachineName()
80-
err = kubeconfig.UnsetCurrentContext(constants.KubeconfigPath, machineName)
80+
err = kubeconfig.UnsetCurrentContext(machineName, constants.KubeconfigPath)
8181
if err != nil {
8282
exit.WithError("update config", err)
8383
}

0 commit comments

Comments
 (0)