From ac98e88626018eabab7e3ac56a2bedf107b98e9f Mon Sep 17 00:00:00 2001 From: Christian Stein Date: Mon, 3 Feb 2020 17:28:31 +0100 Subject: [PATCH] Fixes broken switch arguments in basket configurator Fixes #39 --- lib/core/tools/Get-IcingaCheckCommandConfig.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 b/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 index e98769b..4f63c2d 100644 --- a/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 +++ b/lib/core/tools/Get-IcingaCheckCommandConfig.psm1 @@ -148,7 +148,7 @@ function Get-IcingaCheckCommandConfig() } # Add arguments to a given command - if ($parameter.type.name -eq 'switch') { + if ($parameter.type.name -eq 'SwitchParameter') { $Basket.Command[$Data.Name].arguments.Add( [string]::Format('-{0}', $parameter.Name), @{ 'set_if' = $IcingaCustomVariable; @@ -160,7 +160,7 @@ function Get-IcingaCheckCommandConfig() $Basket.Command[$Data.Name].vars.Add($parameter.Name, $FALSE); # Conditional whether type of parameter is array - } elseif ($parameter.type.name -eq 'array') { + } elseif ($parameter.type.name -eq 'Array') { $Basket.Command[$Data.Name].arguments.Add( [string]::Format('-{0}', $parameter.Name), @{ 'value' = @{