mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes exception on loading by missing environment
This commit is contained in:
parent
db4d86e5b5
commit
7faa516c15
2 changed files with 7 additions and 1 deletions
|
|
@ -28,6 +28,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
||||||
* [#421](https://github.com/Icinga/icinga-powershell-framework/issues/421) Fixes experimental state of `API Check` feature by removing that term and removing the requirement to install `icinga-powershell-restapi` and `icinga-powershell-apichecks`
|
* [#421](https://github.com/Icinga/icinga-powershell-framework/issues/421) Fixes experimental state of `API Check` feature by removing that term and removing the requirement to install `icinga-powershell-restapi` and `icinga-powershell-apichecks`
|
||||||
* [#436](https://github.com/Icinga/icinga-powershell-framework/pull/436) Fixes a lookup error for existing plugin documentation files, which caused files not being generated properly in case a similar name was already present on the system
|
* [#436](https://github.com/Icinga/icinga-powershell-framework/pull/436) Fixes a lookup error for existing plugin documentation files, which caused files not being generated properly in case a similar name was already present on the system
|
||||||
* [#439](https://github.com/Icinga/icinga-powershell-framework/pull/439) Moves PerformanceCounter to private space from previous public, which caused some problems
|
* [#439](https://github.com/Icinga/icinga-powershell-framework/pull/439) Moves PerformanceCounter to private space from previous public, which caused some problems
|
||||||
|
* [#441](https://github.com/Icinga/icinga-powershell-framework/pull/441) Fixes an exception while loading the Framework, caused by a race condition for missing environment variables which are accessed by some plugins before the Framework is loaded properly
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,6 @@ function Use-Icinga()
|
||||||
}
|
}
|
||||||
|
|
||||||
Disable-IcingaProgressPreference;
|
Disable-IcingaProgressPreference;
|
||||||
New-IcingaEnvironmentVariable;
|
|
||||||
|
|
||||||
if ($Minimal) {
|
if ($Minimal) {
|
||||||
$Global:Icinga.Protected.Minimal = $TRUE;
|
$Global:Icinga.Protected.Minimal = $TRUE;
|
||||||
|
|
@ -284,5 +283,11 @@ function Start-IcingaShellAsUser()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Always ensure our environment variables are set to reduce possibles errors
|
||||||
|
# in case we call functions accessing them
|
||||||
|
if (Get-Command -Name 'New-IcingaEnvironmentVariable' -ErrorAction SilentlyContinue) {
|
||||||
|
New-IcingaEnvironmentVariable;
|
||||||
|
}
|
||||||
|
|
||||||
Set-Alias icinga Invoke-IcingaCommand -Description "Execute Icinga Framework commands in a new PowerShell instance for testing or quick access to data";
|
Set-Alias icinga Invoke-IcingaCommand -Description "Execute Icinga Framework commands in a new PowerShell instance for testing or quick access to data";
|
||||||
Export-ModuleMember -Alias * -Function * -Variable *;
|
Export-ModuleMember -Alias * -Function * -Variable *;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue