From c412a8ae4441c3d4867954907d6f398e6aafa233 Mon Sep 17 00:00:00 2001 From: Jose Donizetti Date: Fri, 28 Feb 2020 12:53:51 -0300 Subject: [PATCH] Fix start for existing profile --- cmd/minikube/cmd/start.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index f56ad75c1e36..cd15bbeea923 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -436,12 +436,6 @@ func selectDriver(existing *config.ClusterConfig) registry.DriverState { // Technically unrelated, but important to perform before detection driver.SetLibvirtURI(viper.GetString(kvmQemuURI)) - if viper.GetString("vm-driver") != "" { - ds := driver.Status(viper.GetString("vm-driver")) - out.T(out.Sparkle, `Using the {{.driver}} driver based on user configuration`, out.V{"driver": ds.String()}) - return ds - } - // By default, the driver is whatever we used last time if existing != nil && existing.Driver != "" { ds := driver.Status(existing.Driver) @@ -449,6 +443,12 @@ func selectDriver(existing *config.ClusterConfig) registry.DriverState { return ds } + if viper.GetString("vm-driver") != "" { + ds := driver.Status(viper.GetString("vm-driver")) + out.T(out.Sparkle, `Using the {{.driver}} driver based on user configuration`, out.V{"driver": ds.String()}) + return ds + } + pick, alts := driver.Suggest(driver.Choices()) if pick.Name == "" { exit.WithCodeT(exit.Config, "Unable to determine a default driver to use. Try specifying --vm-driver, or see https://minikube.sigs.k8s.io/docs/start/")