diff --git a/cache/framework_cache.psm1 b/cache/framework_cache.psm1 index 30f8f78..a7427d5 100644 --- a/cache/framework_cache.psm1 +++ b/cache/framework_cache.psm1 @@ -8,10 +8,6 @@ Manually enabling the feature is no longer required. #> -$Global:Icinga = @{ - 'RebuildCache' = $TRUE; -}; - Write-IcingaFrameworkCodeCache; Import-Module icinga-powershell-framework -Global -Force; diff --git a/doc/100-General/10-Changelog.md b/doc/100-General/10-Changelog.md index 3d382c4..576d009 100644 --- a/doc/100-General/10-Changelog.md +++ b/doc/100-General/10-Changelog.md @@ -16,6 +16,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic * [#273](https://github.com/Icinga/icinga-powershell-framework/issues/273) Fixes exceptions and freezes while using Icinga for Windows within an PowerShell ISE session and informing the user properly about the limitations * [#291](https://github.com/Icinga/icinga-powershell-framework/issues/291) Fixes `Split-IcingaVersion` by returning data with naming `mayor` for the version instead of `major`. We will return both results to give developers time to adjust their code before removing the `mayor` object * [#379](https://github.com/Icinga/icinga-powershell-framework/issues/379) Fixes memory leak for Icinga for Windows by using a custom function being more aggressive on memory cleanup +* [#380](https://github.com/Icinga/icinga-powershell-framework/issues/380) Fixes exception while using `Use-Icinga` inside the same shell Icinga for Windows is installed for the first time on the system * [#394](https://github.com/Icinga/icinga-powershell-framework/issues/394) Fixes lookup time for Icinga managed user for large Active Directory environments by limiting lookup to local system only * [#402](https://github.com/Icinga/icinga-powershell-framework/pull/402) Fixes missing address attribute for REST-Api daemon, making it unable to change the listening address * [#403](https://github.com/Icinga/icinga-powershell-framework/pull/403) Fixes memory leak on newly EventLog reader for CLI event stream diff --git a/icinga-powershell-framework.psm1 b/icinga-powershell-framework.psm1 index c62e275..f44043e 100644 --- a/icinga-powershell-framework.psm1 +++ b/icinga-powershell-framework.psm1 @@ -17,14 +17,6 @@ function Use-Icinga() [switch]$Minimal = $FALSE ); - if ($null -ne $Global:Icinga -And $Global:Icinga.ContainsKey('RebuildCache') -And $Global:Icinga.RebuildCache) { - # On some systems, this call will re-build the cache - Import-Module (Join-Path -Path (Get-IcingaForWindowsRootPath) -ChildPath 'icinga-powershell-framework') -Global -Force; - # The second run would then actually import the new module. Only happens on some systems, but with this we fix - # possible exceptions - Import-Module (Join-Path -Path (Get-IcingaForWindowsRootPath) -ChildPath 'icinga-powershell-framework') -Global -Force; - } - # Only apply migrations if we directly call "Use-Icinga" without any other argument if ($LibOnly -eq $FALSE -And $Daemon -eq $FALSE -and $Minimal -eq $FALSE) { Invoke-IcingaForWindowsMigration;