Make the Vmware build extract the host IP properly from ifconfig stdout

This commit is contained in:
Georg Großberger 2015-03-25 14:45:15 +01:00
parent b49d74d999
commit 8c0169b1c4
1 changed files with 1 additions and 1 deletions

View File

@ -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...")