Remove script containing Win-Shell inline commands from local tmp when done

This commit is contained in:
DanHam 2018-04-26 00:20:17 +01:00
parent b9ab2c8048
commit 7cf31060eb
No known key found for this signature in database
GPG Key ID: 58E79AEDD6AA987E
1 changed files with 2 additions and 0 deletions

View File

@ -190,6 +190,8 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
ui.Error(fmt.Sprintf("Unable to extract inline scripts into a file: %s", err))
}
scripts = append(scripts, temp)
// Remove temp script containing the inline commands when done
defer os.Remove(temp)
}
for _, path := range scripts {