Merge pull request #5763 from hashicorp/update_winrmcp

update winrmcp to fix #5752
This commit is contained in:
SwampDragons 2018-01-04 12:29:36 -08:00 committed by GitHub
commit ea9c6e4f65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -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 {

6
vendor/vendor.json vendored
View File

@ -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=",