From 8d8b880ac48bbe77c9f249c3c339406d40cb9d7f Mon Sep 17 00:00:00 2001 From: pauloj95 <37109548+pauloj95@users.noreply.github.com> Date: Tue, 5 Feb 2019 17:47:00 +0000 Subject: [PATCH] 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 --- provisioner/guest_commands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioner/guest_commands.go b/provisioner/guest_commands.go index 3a361a208..ca2b238a4 100644 --- a/provisioner/guest_commands.go +++ b/provisioner/guest_commands.go @@ -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\"", }, }