mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Adds rebuild cache switch to icinga cmd
This commit is contained in:
parent
5f86b2d2e6
commit
7dfa22774f
2 changed files with 9 additions and 3 deletions
|
|
@ -25,6 +25,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
|||
* [#316](https://github.com/Icinga/icinga-powershell-framework/pull/316) The reconfigure menu was previously present inside the Icinga Agent sub-menu and is now moved to the main installation menu for the Management Console
|
||||
* [#318](https://github.com/Icinga/icinga-powershell-framework/pull/318) We always enforce the Icinga Framework Code caching now and ship a plain file to build the cache on first loading
|
||||
* [#322](https://github.com/Icinga/icinga-powershell-framework/pull/322) Remove legacy import feature from Framework and replace it with a dummy function, as no longer required by Icinga for Windows
|
||||
* [#323](https://github.com/Icinga/icinga-powershell-framework/pull/323) Adds `-RebuildCache` switch to `icinga` command alias and `Invoke-IcingaCommand`, for quicker cache re-creation for developers
|
||||
|
||||
## 1.5.2 (2021-07-09)
|
||||
|
||||
|
|
|
|||
|
|
@ -203,9 +203,10 @@ function Invoke-IcingaCommand()
|
|||
[CmdletBinding()]
|
||||
param (
|
||||
$ScriptBlock,
|
||||
[switch]$SkipHeader = $FALSE,
|
||||
[switch]$Manage = $FALSE,
|
||||
[array]$ArgumentList = @()
|
||||
[switch]$SkipHeader = $FALSE,
|
||||
[switch]$Manage = $FALSE,
|
||||
[switch]$RebuildCache = $FALSE,
|
||||
[array]$ArgumentList = @()
|
||||
);
|
||||
|
||||
Import-LocalizedData `
|
||||
|
|
@ -229,6 +230,10 @@ function Invoke-IcingaCommand()
|
|||
Write-IcingaConsoleHeader -HeaderLines $Headers;
|
||||
}
|
||||
|
||||
if ($RebuildCache) {
|
||||
Write-IcingaFrameworkCodeCache;
|
||||
}
|
||||
|
||||
powershell.exe -NoExit -Command {
|
||||
$Script = $args[0];
|
||||
$RootPath = $args[1];
|
||||
|
|
|
|||
Loading…
Reference in a new issue