mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixed update list throwing unknown for 0 pending updates
This commit is contained in:
parent
2f874fa4d2
commit
a33455f343
1 changed files with 5 additions and 1 deletions
|
|
@ -47,8 +47,12 @@ function Invoke-IcingaCheckUpdates()
|
|||
$UpdateCount.AddCheck($IcingaCheck);
|
||||
|
||||
$UpdatePackage = New-IcingaCheckPackage -Name 'Updates' -OperatorAnd -Verbose $Verbose -Checks @(
|
||||
$UpdateCount, $UpdateList
|
||||
$UpdateCount
|
||||
);
|
||||
|
||||
if ($PendingCount -ne 0) {
|
||||
$UpdatePackage.AddCheck($UpdateList);
|
||||
}
|
||||
|
||||
exit (New-IcingaCheckResult -Name 'Pending Updates' -Check $UpdatePackage -NoPerfData $NoPerfData -Compile);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue