update winrmcp to fix #5752
This commit is contained in:
parent
0ae1df2071
commit
7fe1ec03ca
|
@ -176,7 +176,12 @@ func cleanupContent(client *winrm.Client, filePath string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
defer shell.Close()
|
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))
|
cmd, err := shell.Execute(winrm.Powershell(script))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -983,10 +983,10 @@
|
||||||
"revision": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
|
"revision": "179d4d0c4d8d407a32af483c2354df1d2c91e6c3"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "XXmfaQ8fEupEgaGd6PptrLnrE54=",
|
"checksumSHA1": "/NoE6t3UkW4/iKAtbf59GGv6tF8=",
|
||||||
"path": "github.com/packer-community/winrmcp/winrmcp",
|
"path": "github.com/packer-community/winrmcp/winrmcp",
|
||||||
"revision": "e1b7d6e6b1b1a27984270784190f1d06ad91888b",
|
"revision": "81144009af586de8e7729b829266f09dd0d59701",
|
||||||
"revisionTime": "2017-09-29T21:51:32Z"
|
"revisionTime": "2018-01-02T16:08:24Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "oaXvjFg802gS/wx1bx2gAQwa7XQ=",
|
"checksumSHA1": "oaXvjFg802gS/wx1bx2gAQwa7XQ=",
|
||||||
|
|
Loading…
Reference in New Issue