mirror of
https://github.com/rancher/rke.git
synced 2025-09-14 22:20:11 +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 {
|
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")
|
force := ctx.Bool("force")
|
||||||
if !force {
|
if !force {
|
||||||
reader := bufio.NewReader(os.Stdin)
|
reader := bufio.NewReader(os.Stdin)
|
||||||
@@ -90,10 +94,6 @@ func clusterRemoveFromCli(ctx *cli.Context) error {
|
|||||||
if ctx.Bool("local") {
|
if ctx.Bool("local") {
|
||||||
return clusterRemoveLocal(ctx)
|
return clusterRemoveLocal(ctx)
|
||||||
}
|
}
|
||||||
clusterFile, filePath, err := resolveClusterFile(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("Failed to resolve cluster file: %v", err)
|
|
||||||
}
|
|
||||||
clusterFilePath = filePath
|
clusterFilePath = filePath
|
||||||
rkeConfig, err := cluster.ParseConfig(clusterFile)
|
rkeConfig, err := cluster.ParseConfig(clusterFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user