Merge pull request #6415 from brumfb/skip_invalid_lease_files

Fixes VMWare Builder issue regarding DHCP-less NAT networks.
This commit is contained in:
M. Marsh 2018-06-25 16:47:04 -07:00 committed by GitHub
commit 5a6a389e66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -358,7 +358,8 @@ func (d *VmwareDriver) GuestIP(state multistep.StateBag) (string, error) {
// open up the lease and read its contents
fh, err := os.Open(dhcpLeasesPath)
if err != nil {
return "", err
log.Printf("Error while reading DHCP lease path file %s: %s", dhcpLeasesPath, err.Error())
continue
}
defer fh.Close()