Fix code cache creation loop

This commit is contained in:
Lord Hepipud 2021-08-07 01:47:53 +02:00
parent 22c1cd4457
commit 79ace6b475

View file

@ -46,8 +46,6 @@ function Use-Icinga()
Use-IcingaPlugins; Use-IcingaPlugins;
} }
Write-IcingaFrameworkCodeCache;
# This function will allow us to load this entire module including possible # This function will allow us to load this entire module including possible
# actions, making it available within our shell environment # actions, making it available within our shell environment
# First load our custom modules # First load our custom modules
@ -135,7 +133,7 @@ function Import-IcingaLib()
$CacheFile = Get-IcingaFrameworkCodeCacheFile; $CacheFile = Get-IcingaFrameworkCodeCacheFile;
if ($Custom -eq $FALSE -And $CompileCache -eq $FALSE -And (Test-Path $CacheFile)) { if ($CompileCache -eq $FALSE) {
Import-Module 'icinga-powershell-framework' -Global -Force; Import-Module 'icinga-powershell-framework' -Global -Force;
return; return;
} }