packer-community / winrmcp

Copy files to a remote host using WinRM
MIT License
59 stars 31 forks source link

checks for the existence of temp file before delete #28

Closed diegogoding closed 6 years ago

diegogoding commented 6 years ago

Checks to make sure the temp file exists, before trying to delete it. It's a fix for this issue: packer:issues/5752

dylanmei commented 6 years ago

Hello! Thanks for your contribution.

I'm puzzled, as this quietly handles non-existent files

Remove-Item foo -ErrorAction SilentlyContinue

Additionally, can you help me understand what this accomplishes: echo $null > $tmp_file_path