1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fix error with misArg not being declared

also fixed test to work on empty string or not for error reporting
This commit is contained in:
Brian Coca 2015-12-15 09:17:48 -05:00 committed by Matt Clay
parent d9337fbd9c
commit 8687151f7c

View file

@ -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