mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes RemoteSouce being cleared during Update-IcingaRepository
This commit is contained in:
parent
df4759fee3
commit
82af4f9da4
2 changed files with 10 additions and 1 deletions
|
|
@ -19,6 +19,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
||||||
* [#529](https://github.com/Icinga/icinga-powershell-framework/pull/529) Fixes package manifest reader for Icinga for Windows components on Windows 2012 R2 and older
|
* [#529](https://github.com/Icinga/icinga-powershell-framework/pull/529) Fixes package manifest reader for Icinga for Windows components on Windows 2012 R2 and older
|
||||||
* [#523](https://github.com/Icinga/icinga-powershell-framework/pull/523) Fixes errors on encapsulated PowerShell calls for missing Cmdlets `Write-IcingaConsoleError` and `Optimize-IcingaForWindowsMemory`
|
* [#523](https://github.com/Icinga/icinga-powershell-framework/pull/523) Fixes errors on encapsulated PowerShell calls for missing Cmdlets `Write-IcingaConsoleError` and `Optimize-IcingaForWindowsMemory`
|
||||||
* [#524](https://github.com/Icinga/icinga-powershell-framework/issues/524) Fixes uninstallation process by improving the location handling of PowerShell instances with Icinga IMC or Shell
|
* [#524](https://github.com/Icinga/icinga-powershell-framework/issues/524) Fixes uninstallation process by improving the location handling of PowerShell instances with Icinga IMC or Shell
|
||||||
|
* [#545](https://github.com/Icinga/icinga-powershell-framework/issues/545) Fixes `RemoteSource` being cleared within repository `.json` files during `Update-IcingaRepository` tasks
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,15 @@ function Update-IcingaRepository()
|
||||||
Write-IcingaConsoleNotice 'Updating Icinga for Windows repository "{0}"' -Objects $definedRepo.Name;
|
Write-IcingaConsoleNotice 'Updating Icinga for Windows repository "{0}"' -Objects $definedRepo.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
$IcingaRepository = New-IcingaRepositoryFile -Path $Path -RemotePath $RemotePath;
|
# Ensure we use the default RemotePath within our IMC config, unless we specify a different path during update
|
||||||
|
[string]$SetRemotePath = $definedRepo.Value.RemotePath;
|
||||||
|
|
||||||
|
if ([string]::IsNullOrEmpty($RemotePath) -eq $FALSE) {
|
||||||
|
Set-IcingaPowerShellConfig -Path ([string]::Format('Framework.Repository.Repositories.{0}.RemotePath', $definedRepo.Name)) -Value $RemotePath;
|
||||||
|
$SetRemotePath = $RemotePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
$IcingaRepository = New-IcingaRepositoryFile -Path $Path -RemotePath $SetRemotePath;
|
||||||
|
|
||||||
if ($CreateNew) {
|
if ($CreateNew) {
|
||||||
return $IcingaRepository;
|
return $IcingaRepository;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue