mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-08 16:22:15 -04:00
builder/vmware: correct logic in cehcking if file is still there
This commit is contained in:
parent
6211cd2028
commit
8766a93245
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue