builder/vmware: correct logic in cehcking if file is still there

This commit is contained in:
Mitchell Hashimoto 2013-12-06 19:12:49 -08:00
parent 6211cd2028
commit 8766a93245

View file

@ -50,7 +50,7 @@ func (stepCleanFiles) Run(state multistep.StateBag) multistep.StepAction {
ui.Message(fmt.Sprintf("Deleting: %s", path))
if err = dir.Remove(path); err != nil {
// Only report the error if the file still exists
if _, serr := os.Stat(path); serr == nil || os.IsNotExist(serr) {
if _, serr := os.Stat(path); serr == nil || !os.IsNotExist(serr) {
state.Put("error", err)
return multistep.ActionHalt
}