Skip to content

Commit 93ac719

Browse files
authored
Merge pull request #839 from Icinga:fix/agent_installation_lookup_for_missing_attribute
Fix: Icinga Agent installation lookup on missing registry attributes Fixes registry lookup for Icinga Agent installation to check if the required `DisplayName` attribute is defined before checking
2 parents c92c0eb + a19728f commit 93ac719

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

doc/100-General/10-Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
1313

1414
### Bugfixes
1515

16+
* [#833](https://github.com/Icinga/icinga-powershell-framework/issues/833) Fixes registry lookup for Icinga Agent installation to check if the required `DisplayName` attribute is defined before checking
1617
* [#835](https://github.com/Icinga/icinga-powershell-framework/pull/835) Fixes JEA compiler to always enforce a rebuild of the Framework to ensure integrity of JEA profiles
1718
* [#836](https://github.com/Icinga/icinga-powershell-framework/issues/836) Fixes Metric over Time collector not working on Windows 2012 R2 and older
1819

lib/core/icingaagent/getters/Get-IcingaAgentInstallation.psm1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ function Get-IcingaAgentInstallation()
1212
$RegistryData = Get-ItemProperty $regPath;
1313
$IcingaData = $null;
1414
foreach ($entry in $RegistryData) {
15+
if ($null -eq $entry -or $null -eq $entry.DisplayName) {
16+
continue;
17+
}
18+
1519
if ($entry.DisplayName -eq 'Icinga 2') {
1620
$IcingaData = $entry;
1721
break;

0 commit comments

Comments
 (0)