Skip to content

Commit

Permalink
Merge pull request #319 from Icinga:fix/load_framework_instead_of_cache
Browse files Browse the repository at this point in the history
Fix: Load Framework instead of cache file
  • Loading branch information
LordHepipud authored Aug 6, 2021
2 parents 2583e82 + 62bcbe5 commit 22c1cd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 49 deletions.
49 changes: 3 additions & 46 deletions icinga-powershell-framework.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,9 @@
Copyright = '(c) 2021 Icinga GmbH | MIT'
Description = 'Icinga for Windows module which allows to entirely monitor the Windows Host system.'
PowerShellVersion = '4.0'
NestedModules = @(
'.\cache\framework_cache.psm1'
)
FunctionsToExport = @(
'Use-Icinga',
'Invoke-IcingaCommand',
'Import-IcingaLib',
'Get-IcingaFrameworkCodeCacheFile',
'Write-IcingaFrameworkCodeCache',
'Publish-IcingaModuleManifest',
'Publish-IcingaEventlogDocumentation',
'Get-IcingaPluginDir',
'Get-IcingaCustomPluginDir',
'Get-IcingaCacheDir',
'Get-IcingaPowerShellConfigDir',
'Get-IcingaFrameworkRootPath',
'Get-IcingaForWindowsRootPath',
'Get-IcingaPowerShellModuleFile',
'Start-IcingaShellAsUser',
'Get-IcingaPowerShellConfig',
'Read-IcingaPowerShellConfig',
'Test-IcingaPowerShellConfigItem',
'Write-IcingaConsoleOutput',
'Write-IcingaConsoleNotice',
'Write-IcingaConsoleWarning',
'Read-IcingaFileContent',
'Invoke-IcingaInternalServiceCall',
'Get-IcingaFrameworkApiChecks',
'Get-IcingaBackgroundDaemons',
'Enable-IcingaUntrustedCertificateValidation',
'Write-IcingaEventMessage',
'Exit-IcingaExecutePlugin',
'Exit-IcingaPluginNotInstalled',
'Exit-IcingaThrowException',
'Set-IcingaTLSVersion',
'Disable-IcingaProgressPreference',
'New-IcingaNewLine',
'Write-IcingaConsolePlain',
'Test-IcingaFunction',
'Write-IcingaConsoleHeader',
'Test-IcingaFrameworkConsoleOutput',
'ConvertTo-IcingaSecureString',
'ConvertTo-JsonUTF8Bytes',
'ConvertFrom-JsonUTF8'
)
CmdletsToExport = @('*')
NestedModules = @( '.\cache\framework_cache.psm1' )
FunctionsToExport = @( '*' )
CmdletsToExport = @( '*' )
VariablesToExport = '*'
AliasesToExport = @( 'icinga' )
PrivateData = @{
Expand Down
5 changes: 2 additions & 3 deletions icinga-powershell-framework.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ function Use-Icinga()
);

if ($null -ne $Global:Icinga -And $Global:Icinga.ContainsKey('RebuildCache') -And $Global:Icinga.RebuildCache) {
Remove-Module 'icinga-powershell-framework';
Import-Module (Get-IcingaFrameworkCodeCacheFile) -Global -Force;
Import-Module 'icinga-powershell-framework' -Global -Force;
}

Disable-IcingaProgressPreference;
Expand Down Expand Up @@ -137,7 +136,7 @@ function Import-IcingaLib()
$CacheFile = Get-IcingaFrameworkCodeCacheFile;

if ($Custom -eq $FALSE -And $CompileCache -eq $FALSE -And (Test-Path $CacheFile)) {
Import-Module $CacheFile -Global;
Import-Module 'icinga-powershell-framework' -Global -Force;
return;
}

Expand Down

0 comments on commit 22c1cd4

Please sign in to comment.