standardise the powershell FileUtils (#34969)

This commit is contained in:
Jordan Borean 2018-01-17 14:16:34 +10:00 committed by GitHub
commit 6f9f337a67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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}
}