mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-22 07:39:52 -05:00
Fixed update list throwing unknown for 0 pending updates
This commit is contained in:
parent
f0b86ec346
commit
035fbb8d49
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