Commit 7e74a38f authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

Merge pull request #2000 from cyberhouse/ifconfig-regex

Make the Vmware build extract the host IP properly from ifconfig stdout
parents b8a3a5ff 8c0169b1
......@@ -44,7 +44,7 @@ func (f *IfconfigIPFinder) HostIP() (string, error) {
return "", err
}
re := regexp.MustCompile(`inet\s*(?:addr:)?(.+?)\s`)
re := regexp.MustCompile(`inet[^\d]+([\d\.]+)\s`)
matches := re.FindStringSubmatch(stdout.String())
if matches == nil {
return "", errors.New("IP not found in ifconfig output...")
......
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