diff --git a/cmd/remove.go b/cmd/remove.go index 59e1cc94..b1dce25d 100644 --- a/cmd/remove.go +++ b/cmd/remove.go @@ -79,6 +79,9 @@ func ClusterRemove( } func clusterRemoveFromCli(ctx *cli.Context) error { + if ctx.Bool("local") { + return clusterRemoveLocal(ctx) + } clusterFile, filePath, err := resolveClusterFile(ctx) if err != nil { return fmt.Errorf("Failed to resolve cluster file: %v", err) @@ -96,9 +99,6 @@ func clusterRemoveFromCli(ctx *cli.Context) error { return nil } } - if ctx.Bool("local") { - return clusterRemoveLocal(ctx) - } if ctx.Bool("dind") { return clusterRemoveDind(ctx) } @@ -120,7 +120,7 @@ func clusterRemoveLocal(ctx *cli.Context) error { var rkeConfig *v3.RancherKubernetesEngineConfig clusterFile, filePath, err := resolveClusterFile(ctx) if err != nil { - log.Infof(context.Background(), "Failed to resolve cluster file, using default cluster instead") + log.Warnf(context.Background(), "Failed to resolve cluster file, using default cluster instead") rkeConfig = cluster.GetLocalRKEConfig() } else { clusterFilePath = filePath