Skip to content

Commit

Permalink
Fixed error parsing old version "latest" or "stable"
Browse files Browse the repository at this point in the history
Fixes #8210

Signed-off-by: kadern0 <[email protected]>
  • Loading branch information
kadern0 committed May 21, 2020
1 parent 25045cf commit 6189206
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/minikube/cmd/start_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,14 @@ func updateExistingConfigFromFlags(cmd *cobra.Command, existing *config.ClusterC
}

if cmd.Flags().Changed(kubernetesVersion) {
cc.KubernetesConfig.KubernetesVersion = viper.GetString(kubernetesVersion)
switch viper.GetString(kubernetesVersion) {
case "latest":
existing.KubernetesConfig.KubernetesVersion = constants.NewestKubernetesVersion
case "stable":
existing.KubernetesConfig.KubernetesVersion = constants.DefaultKubernetesVersion
default:
existing.KubernetesConfig.KubernetesVersion = viper.GetString(kubernetesVersion)
}
}

if cmd.Flags().Changed(apiServerName) {
Expand Down

0 comments on commit 6189206

Please sign in to comment.