Commit ff636957 authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Fix FetchIngressIP error checking

parent c5a53bcc
......@@ -348,12 +348,11 @@ func FetchIngressIP(kubeconfig string) ([]string, error) {
if err != nil {
return nil, err
}
ingressIP := strings.Trim(res, " ")
ingressIPs := strings.Split(ingressIP, " ")
if len(ingressIPs) == 0 {
return nil, errors.New("no ingress IP found")
res = strings.TrimSpace(res)
if res == "" {
return nil, errors.New("no ingress IPs found")
}
return ingressIPs, nil
return strings.Split(res, " "), nil
}
func (v VagrantNode) FetchNodeExternalIP() (string, error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment