Fix to not execute clusterBootstrapper.Delete when clusterBootstrapper is nil #3662

pull/3663/head
Yugo Horie 2019-02-13 10:08:06 +09:00
parent 414b8ab9f8
commit 00aff6039b
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ associated files.`,
bsName := viper.GetString(cmdcfg.Bootstrapper) // Name ?
console.OutStyle("resetting", "Reverting Kubernetes %s using %s ...", kc.KubernetesVersion, bsName)
clusterBootstrapper, err := GetClusterBootstrapper(api, viper.GetString(cmdcfg.Bootstrapper))
if err != nil {
if err == nil {
if err = clusterBootstrapper.DeleteCluster(kc); err != nil {
console.ErrLn("Failed to delete cluster: %v", err)
}