mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 00:03:10 +00:00
win_copy: Add missing check_mode fix (#31469)
* Add missing check_mode fix * Refactor conditional to use the one embedded in Remove-Item
This commit is contained in:
committed by
Dag Wieers
parent
1c9bffe248
commit
5bf9f271b3
@@ -76,7 +76,7 @@ Function Copy-File($source, $dest) {
|
||||
}
|
||||
|
||||
if (Test-Path -Path $dest -PathType Leaf) {
|
||||
Remove-Item -Path $dest -Force -Recurse | Out-Null
|
||||
Remove-Item -Path $dest -Force -Recurse -WhatIf:$check_mode | Out-Null
|
||||
$diff += "-$dest`n"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user