diff --git a/vendor/github.com/packer-community/winrmcp/winrmcp/cp.go b/vendor/github.com/packer-community/winrmcp/winrmcp/cp.go index 2890e55ef..4d089c13d 100644 --- a/vendor/github.com/packer-community/winrmcp/winrmcp/cp.go +++ b/vendor/github.com/packer-community/winrmcp/winrmcp/cp.go @@ -176,7 +176,12 @@ func cleanupContent(client *winrm.Client, filePath string) error { } defer shell.Close() - script := fmt.Sprintf(`Remove-Item %s -ErrorAction SilentlyContinue`, filePath) + script := fmt.Sprintf(` + $tmp_file_path = [System.IO.Path]::GetFullPath("%s") + if (Test-Path $tmp_file_path) { + Remove-Item $tmp_file_path -ErrorAction SilentlyContinue + } + `, filePath) cmd, err := shell.Execute(winrm.Powershell(script)) if err != nil { diff --git a/vendor/vendor.json b/vendor/vendor.json index a229cabce..4438b367e 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -983,10 +983,10 @@ "revision": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3" }, { - "checksumSHA1": "XXmfaQ8fEupEgaGd6PptrLnrE54=", + "checksumSHA1": "/NoE6t3UkW4/iKAtbf59GGv6tF8=", "path": "github.com/packer-community/winrmcp/winrmcp", - "revision": "e1b7d6e6b1b1a27984270784190f1d06ad91888b", - "revisionTime": "2017-09-29T21:51:32Z" + "revision": "81144009af586de8e7729b829266f09dd0d59701", + "revisionTime": "2018-01-02T16:08:24Z" }, { "checksumSHA1": "oaXvjFg802gS/wx1bx2gAQwa7XQ=",