mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2026-02-03 12:19:29 -05:00
Fixes stacktrace in plugin output, when pkugin is not installed
Caused by newly introduces Get-Help check to fetch arguments
This commit is contained in:
parent
6d127a8082
commit
73dd3648d3
1 changed files with 6 additions and 1 deletions
|
|
@ -25,7 +25,12 @@ function ConvertTo-IcingaPowerShellArguments()
|
|||
return @{ };
|
||||
}
|
||||
|
||||
$CommandHelp = Get-Help -Name $Command -Full;
|
||||
$CommandHelp = Get-Help -Name $Command -Full -ErrorAction SilentlyContinue;
|
||||
|
||||
# Ensure we do not cause exceptions along the border in case the plugin is not installed
|
||||
if ($null -eq $CommandHelp) {
|
||||
return @{ };
|
||||
}
|
||||
|
||||
[hashtable]$IcingaArguments = @{ };
|
||||
[int]$ArgumentIndex = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue