Skip to content

Commit 62bcbe5

Browse files
committed
Fix framework loading instead of cache
1 parent 2583e82 commit 62bcbe5

File tree

2 files changed

+5
-49
lines changed

2 files changed

+5
-49
lines changed

icinga-powershell-framework.psd1

+3-46
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,9 @@
77
Copyright = '(c) 2021 Icinga GmbH | MIT'
88
Description = 'Icinga for Windows module which allows to entirely monitor the Windows Host system.'
99
PowerShellVersion = '4.0'
10-
NestedModules = @(
11-
'.\cache\framework_cache.psm1'
12-
)
13-
FunctionsToExport = @(
14-
'Use-Icinga',
15-
'Invoke-IcingaCommand',
16-
'Import-IcingaLib',
17-
'Get-IcingaFrameworkCodeCacheFile',
18-
'Write-IcingaFrameworkCodeCache',
19-
'Publish-IcingaModuleManifest',
20-
'Publish-IcingaEventlogDocumentation',
21-
'Get-IcingaPluginDir',
22-
'Get-IcingaCustomPluginDir',
23-
'Get-IcingaCacheDir',
24-
'Get-IcingaPowerShellConfigDir',
25-
'Get-IcingaFrameworkRootPath',
26-
'Get-IcingaForWindowsRootPath',
27-
'Get-IcingaPowerShellModuleFile',
28-
'Start-IcingaShellAsUser',
29-
'Get-IcingaPowerShellConfig',
30-
'Read-IcingaPowerShellConfig',
31-
'Test-IcingaPowerShellConfigItem',
32-
'Write-IcingaConsoleOutput',
33-
'Write-IcingaConsoleNotice',
34-
'Write-IcingaConsoleWarning',
35-
'Read-IcingaFileContent',
36-
'Invoke-IcingaInternalServiceCall',
37-
'Get-IcingaFrameworkApiChecks',
38-
'Get-IcingaBackgroundDaemons',
39-
'Enable-IcingaUntrustedCertificateValidation',
40-
'Write-IcingaEventMessage',
41-
'Exit-IcingaExecutePlugin',
42-
'Exit-IcingaPluginNotInstalled',
43-
'Exit-IcingaThrowException',
44-
'Set-IcingaTLSVersion',
45-
'Disable-IcingaProgressPreference',
46-
'New-IcingaNewLine',
47-
'Write-IcingaConsolePlain',
48-
'Test-IcingaFunction',
49-
'Write-IcingaConsoleHeader',
50-
'Test-IcingaFrameworkConsoleOutput',
51-
'ConvertTo-IcingaSecureString',
52-
'ConvertTo-JsonUTF8Bytes',
53-
'ConvertFrom-JsonUTF8'
54-
)
55-
CmdletsToExport = @('*')
10+
NestedModules = @( '.\cache\framework_cache.psm1' )
11+
FunctionsToExport = @( '*' )
12+
CmdletsToExport = @( '*' )
5613
VariablesToExport = '*'
5714
AliasesToExport = @( 'icinga' )
5815
PrivateData = @{

icinga-powershell-framework.psm1

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ function Use-Icinga()
1818
);
1919

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

2524
Disable-IcingaProgressPreference;
@@ -137,7 +136,7 @@ function Import-IcingaLib()
137136
$CacheFile = Get-IcingaFrameworkCodeCacheFile;
138137

139138
if ($Custom -eq $FALSE -And $CompileCache -eq $FALSE -And (Test-Path $CacheFile)) {
140-
Import-Module $CacheFile -Global;
139+
Import-Module 'icinga-powershell-framework' -Global -Force;
141140
return;
142141
}
143142

0 commit comments

Comments
 (0)