提交 efac79eb 编写于 作者: S Sharif Elgamal

account for hyphens in profile name

上级 add1c8f9
......@@ -240,7 +240,8 @@ func MachineName(cc config.ClusterConfig, n config.Node) string {
// ClusterNameFromMachine retrieves the cluster name embedded in the machine name
func ClusterNameFromMachine(name string) string {
if strings.Contains(name, "-") {
return strings.Split(name, "-")[0]
a := strings.Split(name, "-")
return strings.Join(a[0:len(a)-2], "-")
}
return name
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册