mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Merge pull request #362 from Icinga:fix/repository_install_fail_fileshare
Fix: Repository component install from file share The installation from file share locations will fail, in case no `LocalPath` is assigned to the repository configuration and is also failing by invalid escaping of the path. This is now fixed as the `RemotePath` is the only one being required and in addition downloads from file shares of component packages is now working as intended.
This commit is contained in:
commit
acbbc4f68b
4 changed files with 10 additions and 3 deletions
|
|
@ -14,6 +14,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
||||||
* [#361](https://github.com/Icinga/icinga-powershell-framework/issues/361) Fixes IMC freeze on Icinga Director Self-Service installation, in case no Agent installation set on Self-Service API config
|
* [#361](https://github.com/Icinga/icinga-powershell-framework/issues/361) Fixes IMC freeze on Icinga Director Self-Service installation, in case no Agent installation set on Self-Service API config
|
||||||
|
* [#362](https://github.com/Icinga/icinga-powershell-framework/issues/362) Fixes repository component installation from file share locations
|
||||||
|
|
||||||
## 1.6.0 (2021-09-07)
|
## 1.6.0 (2021-09-07)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,8 @@ function Read-IcingaRepositoryFile()
|
||||||
$RepoPath = $Repository.LocalPath;
|
$RepoPath = $Repository.LocalPath;
|
||||||
$Content = Get-Content -Path (Join-Path -Path $RepoPath -ChildPath 'ifw.repo.json') -Raw;
|
$Content = Get-Content -Path (Join-Path -Path $RepoPath -ChildPath 'ifw.repo.json') -Raw;
|
||||||
} elseif ([string]::IsNullOrEmpty($Repository.RemotePath) -eq $FALSE -And (Test-Path -Path $Repository.RemotePath)) {
|
} elseif ([string]::IsNullOrEmpty($Repository.RemotePath) -eq $FALSE -And (Test-Path -Path $Repository.RemotePath)) {
|
||||||
$RepoPath = $Repository.RemotePath;
|
$RepoPath = $Repository.RemotePath;
|
||||||
$WebContent = Get-Content -Path (Join-Path -Path $RepoPath -ChildPath 'ifw.repo.json') -Raw;
|
$Content = Get-Content -Path (Join-Path -Path $RepoPath -ChildPath 'ifw.repo.json') -Raw;
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
$RepoPath = $Repository.RemotePath;
|
$RepoPath = $Repository.RemotePath;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ function Search-IcingaRepository()
|
||||||
$SearchList | Add-Member -MemberType NoteProperty -Name 'Repos' -Value @();
|
$SearchList | Add-Member -MemberType NoteProperty -Name 'Repos' -Value @();
|
||||||
|
|
||||||
foreach ($entry in $Repositories) {
|
foreach ($entry in $Repositories) {
|
||||||
$RepoContent = Read-IcingaRepositoryFile -Name $entry.Name;
|
$RepoContent = Read-IcingaRepositoryFile -Name $entry.Name;
|
||||||
|
|
||||||
if ($null -eq $RepoContent) {
|
if ($null -eq $RepoContent) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,12 @@ function Invoke-IcingaWebRequest()
|
||||||
$Index++;
|
$Index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If our URI is a local path or a file share path, always ensure to use the correct Windows directory
|
||||||
|
# handling with '\' instead of '/'
|
||||||
|
if ([string]::IsNullOrEmpty($Uri) -eq $FALSE -And (Test-Path $Uri)) {
|
||||||
|
$Uri = $Uri.Replace('/', '\');
|
||||||
|
}
|
||||||
|
|
||||||
$WebArguments = @{
|
$WebArguments = @{
|
||||||
'Uri' = $Uri;
|
'Uri' = $Uri;
|
||||||
'Method' = $Method;
|
'Method' = $Method;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue