mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Fix 'touch' mode so it creates zero size files. (#20876)
This commit is contained in:
committed by
John R Barker
parent
ed52714dba
commit
2c70450e23
@@ -35,7 +35,7 @@ if ($state -eq "touch") {
|
||||
if (Test-Path $path) {
|
||||
(Get-ChildItem $path).LastWriteTime = Get-Date
|
||||
} else {
|
||||
echo $null > $path
|
||||
Write-Output $null | Out-File -FilePath $path -Encoding ASCII
|
||||
}
|
||||
}
|
||||
$result.changed = $true
|
||||
|
||||
Reference in New Issue
Block a user