use ConvertTo-Bool for the force parameter

This commit is contained in:
Tal Auslander 2015-07-06 11:22:23 +03:00
parent e80073ff87
commit c786202ee4

View file

@ -40,9 +40,9 @@ Else {
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
Try {