Commit 8d351063 authored by Brad Davidson's avatar Brad Davidson Committed by Brad Davidson

Fix FetchIngressIP error checking

parent 0504e44d
...@@ -348,12 +348,11 @@ func FetchIngressIP(kubeconfig string) ([]string, error) { ...@@ -348,12 +348,11 @@ func FetchIngressIP(kubeconfig string) ([]string, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
ingressIP := strings.Trim(res, " ") res = strings.TrimSpace(res)
ingressIPs := strings.Split(ingressIP, " ") if res == "" {
if len(ingressIPs) == 0 { return nil, errors.New("no ingress IPs found")
return nil, errors.New("no ingress IP found")
} }
return ingressIPs, nil return strings.Split(res, " "), nil
} }
func (v VagrantNode) FetchNodeExternalIP() (string, error) { 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