standardise the powershell FileUtils (#34969)

This commit is contained in:
Jordan Borean
2018-01-17 14:16:34 +10:00
committed by GitHub
parent 944ae47701
commit 6f9f337a67
8 changed files with 86 additions and 73 deletions

View File

@@ -28,11 +28,11 @@ $result = @{
cmd = $raw_command_line
}
if ($creates -and $(Test-FilePath -path $creates)) {
if ($creates -and $(Test-AnsiblePath -Path $creates)) {
Exit-Json @{msg="skipped, since $creates exists";cmd=$raw_command_line;changed=$false;skipped=$true;rc=0}
}
if ($removes -and -not $(Test-FilePath -path $removes)) {
if ($removes -and -not $(Test-AnsiblePath -Path $removes)) {
Exit-Json @{msg="skipped, since $removes does not exist";cmd=$raw_command_line;changed=$false;skipped=$true;rc=0}
}