mirror of https://github.com/kubernetes/kops.git
kops set cluster: honor --name flag
We were not using the regular method to get the cluster name, and this meant that the `--name` flag was being ignored.
This commit is contained in:
parent
6e9a315ac9
commit
4ed47d632b
|
|
@ -67,7 +67,7 @@ func NewCmdSetCluster(f *util.Factory, out io.Writer) *cobra.Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
if options.ClusterName == "" {
|
if options.ClusterName == "" {
|
||||||
options.ClusterName = ClusterNameFromKubecfg()
|
options.ClusterName = rootCommand.ClusterName()
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := commands.RunSetCluster(f, cmd, out, options); err != nil {
|
if err := commands.RunSetCluster(f, cmd, out, options); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue