mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 15:11:23 -07:00
use ConvertTo-Bool for the force parameter
This commit is contained in:
parent
64f19fc4c6
commit
8766641871
1 changed files with 2 additions and 2 deletions
|
@ -40,9 +40,9 @@ Else {
|
||||||
Fail-Json $result "missing required argument: dest"
|
Fail-Json $result "missing required argument: dest"
|
||||||
}
|
}
|
||||||
|
|
||||||
$force = Get-Attr -obj $params -name "force" "no"
|
$force = Get-Attr -obj $params -name "force" "no" | ConvertTo-Bool
|
||||||
|
|
||||||
If ($force -eq "yes" -or -not (Test-Path $dest)) {
|
If ($force -or -not (Test-Path $dest)) {
|
||||||
$client = New-Object System.Net.WebClient
|
$client = New-Object System.Net.WebClient
|
||||||
|
|
||||||
Try {
|
Try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue