add force to powershell move command

this will allow powershell move in provisioners and replace file if existing found...

issue example: https://github.com/hashicorp/packer/issues/7280
This commit is contained in:
pauloj95 2019-02-05 17:47:00 +00:00 committed by GitHub
parent 9787e787d4
commit 8d8b880ac4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ var guestOSTypeCommands = map[string]guestOSTypeCommand{
mkdir: "powershell.exe -Command \"New-Item -ItemType directory -Force -ErrorAction SilentlyContinue -Path %s\"",
removeDir: "powershell.exe -Command \"rm %s -recurse -force\"",
statPath: "powershell.exe -Command { if (test-path %s) { exit 0 } else { exit 1 } }",
mv: "powershell.exe -Command \"mv %s %s\"",
mv: "powershell.exe -Command \"mv %s %s -force\"",
},
}