mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
parent
61a6aaee7c
commit
ac98e88626
1 changed files with 2 additions and 2 deletions
|
|
@ -148,7 +148,7 @@ function Get-IcingaCheckCommandConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add arguments to a given command
|
# Add arguments to a given command
|
||||||
if ($parameter.type.name -eq 'switch') {
|
if ($parameter.type.name -eq 'SwitchParameter') {
|
||||||
$Basket.Command[$Data.Name].arguments.Add(
|
$Basket.Command[$Data.Name].arguments.Add(
|
||||||
[string]::Format('-{0}', $parameter.Name), @{
|
[string]::Format('-{0}', $parameter.Name), @{
|
||||||
'set_if' = $IcingaCustomVariable;
|
'set_if' = $IcingaCustomVariable;
|
||||||
|
|
@ -160,7 +160,7 @@ function Get-IcingaCheckCommandConfig()
|
||||||
$Basket.Command[$Data.Name].vars.Add($parameter.Name, $FALSE);
|
$Basket.Command[$Data.Name].vars.Add($parameter.Name, $FALSE);
|
||||||
|
|
||||||
# Conditional whether type of parameter is array
|
# 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(
|
$Basket.Command[$Data.Name].arguments.Add(
|
||||||
[string]::Format('-{0}', $parameter.Name), @{
|
[string]::Format('-{0}', $parameter.Name), @{
|
||||||
'value' = @{
|
'value' = @{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue