1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-14 14:09:49 +00:00

Make cluster.yml check the first check

This commit is contained in:
Sebastiaan van Steenis
2018-06-23 14:52:06 +02:00
committed by Alena Prokharchyk
parent 93a8cd9ef4
commit a330cfb907

View File

@@ -74,6 +74,10 @@ func ClusterRemove(
}
func clusterRemoveFromCli(ctx *cli.Context) error {
clusterFile, filePath, err := resolveClusterFile(ctx)
if err != nil {
return fmt.Errorf("Failed to resolve cluster file: %v", err)
}
force := ctx.Bool("force")
if !force {
reader := bufio.NewReader(os.Stdin)
@@ -90,10 +94,6 @@ 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)
}
clusterFilePath = filePath
rkeConfig, err := cluster.ParseConfig(clusterFile)
if err != nil {