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 <kaderno@gmail.com>
  • Loading branch information
kadern0 committed May 21, 2020
1 parent d734118 commit ecf61be
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 @@ -471,7 +471,14 @@ func updateExistingConfigFromFlags(cmd *cobra.Command, existing *config.ClusterC
}

if cmd.Flags().Changed(kubernetesVersion) {
existing.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 ecf61be

Please sign in to comment.