Fix 'touch' mode so it creates zero size files. (#20876)

This commit is contained in:
jhawkesworth 2017-02-03 12:36:47 +00:00 committed by John R Barker
parent ed52714dba
commit 2c70450e23
2 changed files with 11 additions and 1 deletions

View file

@ -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