Skip to content

Commit cb68ce2

Browse files
authored
Use -Force when creating Windows folder to avoid ResourceExists error (#598)
Signed-off-by: Nicolas Guerguadj <[email protected]>
1 parent a5720e1 commit cb68ce2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/command/windowsOSCommand.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (fs windowsOSCommand) CreateDirectory(
2828
return createDirectory(
2929
runner,
3030
name,
31-
fmt.Sprintf("New-Item -Path %v -ItemType Directory", remotePath),
31+
fmt.Sprintf("New-Item -Force -Path %v -ItemType Directory", remotePath),
3232
fmt.Sprintf("if (-not (Test-Path -Path %v/*)) { Remove-Item -Path %v -ErrorAction SilentlyContinue }", remotePath, remotePath),
3333
useSudo,
3434
opts...)

0 commit comments

Comments
 (0)