suggestion by @nitzmahone, to not use Get-Attr in combination with ConvertTo-Bool
This commit is contained in:
parent
d5ab52eb58
commit
1c097f9495
1 changed files with 2 additions and 1 deletions
|
@ -88,7 +88,8 @@ Set-Attr $result "changed" $false;
|
||||||
|
|
||||||
$path = Get-Attr $params "path" -failifempty $true
|
$path = Get-Attr $params "path" -failifempty $true
|
||||||
$user = Get-Attr $params "user" -failifempty $true
|
$user = Get-Attr $params "user" -failifempty $true
|
||||||
$recurse = Get-Attr $params "recurse" "no" -validateSet "no","yes" -resultobj $result | ConvertTo-Bool
|
$recurse = Get-Attr $params "recurse" "no" -validateSet "no","yes" -resultobj $result
|
||||||
|
$recurse = $recurse | ConvertTo-Bool
|
||||||
|
|
||||||
If (-Not (Test-Path -Path $path)) {
|
If (-Not (Test-Path -Path $path)) {
|
||||||
Fail-Json $result "$path file or directory does not exist on the host"
|
Fail-Json $result "$path file or directory does not exist on the host"
|
||||||
|
|
Loading…
Reference in a new issue