mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-24 00:41:41 -04:00
builder/vmware: correct logic in cehcking if file is still there
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user