From 8687151f7c64f7bd046242c8d343a5728dd36aa9 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 15 Dec 2015 09:17:48 -0500 Subject: [PATCH] fix error with misArg not being declared also fixed test to work on empty string or not for error reporting --- lib/ansible/modules/extras/windows/win_firewall_rule.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/extras/windows/win_firewall_rule.ps1 b/lib/ansible/modules/extras/windows/win_firewall_rule.ps1 index 63ada997456..33ac7f3fbbd 100644 --- a/lib/ansible/modules/extras/windows/win_firewall_rule.ps1 +++ b/lib/ansible/modules/extras/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