mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Merge pull request #319 from Icinga:fix/load_framework_instead_of_cache
Fix: Load Framework instead of cache file
This commit is contained in:
commit
22c1cd4457
2 changed files with 5 additions and 49 deletions
|
|
@ -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 = @{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue