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:
committed by
Alena Prokharchyk
parent
93a8cd9ef4
commit
a330cfb907
@@ -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 {
|
||||
|
Reference in New Issue
Block a user