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:
Justin Santa Barbara 2018-06-14 02:00:10 -04:00
parent 6e9a315ac9
commit 4ed47d632b
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ func NewCmdSetCluster(f *util.Factory, out io.Writer) *cobra.Command {
}
if options.ClusterName == "" {
options.ClusterName = ClusterNameFromKubecfg()
options.ClusterName = rootCommand.ClusterName()
}
if err := commands.RunSetCluster(f, cmd, out, options); err != nil {