Merge pull request #140 from Icinga/fix/unable_to_fetch_module_version_for_unloaded_modules

Fix: Version fetching for not loaded modules is impossible

Fixes version fetching for not loaded modules during upgrades/plugin calls with `Get-IcingaPowerShellModuleVersion`
This commit is contained in:
Lord Hepipud 2020-11-02 12:59:49 +01:00 committed by GitHub
commit 5b7861780a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -23,6 +23,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
* [#128](https://github.com/Icinga/icinga-powershell-framework/issues/128) Fixes unhandled output from loading `System.Reflection.Assembly` which can cause weird side effects for plugin outputs * [#128](https://github.com/Icinga/icinga-powershell-framework/issues/128) Fixes unhandled output from loading `System.Reflection.Assembly` which can cause weird side effects for plugin outputs
* [#130](https://github.com/Icinga/icinga-powershell-framework/issues/130) Fix crash while running services as background task to collect metrics over time by missing Performance Counter cache initialisation * [#130](https://github.com/Icinga/icinga-powershell-framework/issues/130) Fix crash while running services as background task to collect metrics over time by missing Performance Counter cache initialisation
* [#138](https://github.com/Icinga/icinga-powershell-framework/issues/138) Fixes possible value overflow on `Convert-Bytes` while converting from anything larger than MB to Bytes * [#138](https://github.com/Icinga/icinga-powershell-framework/issues/138) Fixes possible value overflow on `Convert-Bytes` while converting from anything larger than MB to Bytes
* [#140](https://github.com/Icinga/icinga-powershell-framework/issues/140) Fixes version fetching for not loaded modules during upgrades/plugin calls with `Get-IcingaPowerShellModuleVersion`
## 1.2.0 (2020-08-28) ## 1.2.0 (2020-08-28)

View file

@ -25,7 +25,7 @@ function Get-IcingaPowerShellModuleVersion()
$ModuleName $ModuleName
); );
$ModuleDetails = Get-Module -Name $ModuleName; $ModuleDetails = Get-Module -ListAvailable $ModuleName;
if ($null -eq $ModuleDetails) { if ($null -eq $ModuleDetails) {
return $null; return $null;