Merge pull request #4810 from bryonr/fix_vmware_shutdown_cleanup_osx

Help ensure VMX builder properly removes mounted CDs on OS X
This commit is contained in:
Matthew Hooker 2017-06-05 15:17:08 -07:00 committed by GitHub
commit bf830e393d

View file

@ -8,7 +8,6 @@ import (
"github.com/mitchellh/multistep"
"log"
"regexp"
"runtime"
"strings"
"time"
)
@ -125,10 +124,10 @@ LockWaitLoop:
}
}
if runtime.GOOS != "darwin" && !s.Testing {
if !s.Testing {
// Windows takes a while to yield control of the files when the
// process is exiting. Ubuntu will yield control of the files but
// VMWare may overwrite the VMX cleanup steps that run after this,
// process is exiting. Ubuntu and OS X will yield control of the files
// but VMWare may overwrite the VMX cleanup steps that run after this,
// so we wait to ensure VMWare has exited and flushed the VMX.
// We just sleep here. In the future, it'd be nice to find a better