diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2015-12-15 09:17:48 -0500 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2015-12-15 09:17:48 -0500 |
commit | 641a347d96fe05a2d03e486c5c1313d741153854 (patch) | |
tree | 68bbaccd3b1010514cc0587d3d4f353cff14f24a /windows/win_firewall_rule.ps1 | |
parent | cbe0211f3db34d1bdca93a67fba96fbd0d221a5f (diff) | |
download | ansible-modules-extras-641a347d96fe05a2d03e486c5c1313d741153854.tar.gz |
fix error with misArg not being declared
also fixed test to work on empty string or not for error reporting
Diffstat (limited to 'windows/win_firewall_rule.ps1')
-rw-r--r-- | windows/win_firewall_rule.ps1 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/windows/win_firewall_rule.ps1 b/windows/win_firewall_rule.ps1 index 63ada997..33ac7f3f 100644 --- a/windows/win_firewall_rule.ps1 +++ b/windows/win_firewall_rule.ps1 @@ -205,6 +205,7 @@ $direction=Get-Attr $params "direction" ""; $force=Get-Attr $params "force" $false; $action=Get-Attr $params "action" ""; +$misArg = '' # Check the arguments if ($enable -ne $null) { if ($enable -eq $true) { @@ -262,7 +263,7 @@ foreach ($arg in $args){ $winprofile=Get-Attr $params "profile" "current"; $fwsettings.Add("profile", $winprofile) -if ($($($misArg|measure).count) -gt 0){ +if ($misArg){ $result=New-Object psobject @{ changed=$false failed=$true |