Fixes missing architecture check on installation

This commit is contained in:
Lord Hepipud 2021-08-17 21:46:23 +02:00
parent fd96a00db4
commit 32109f0b2b

View file

@ -18,6 +18,7 @@ function Get-IcingaRepositoryPackage()
$SourceRepo = $null;
$RepoName = $null;
[bool]$HasRepo = $FALSE;
[bool]$Isx86 = [bool]([IntPtr]::Size -eq 4);
foreach ($entry in $Repositories) {
$RepoContent = Read-IcingaRepositoryFile -Name $entry.Name;
@ -45,6 +46,10 @@ function Get-IcingaRepositoryPackage()
continue;
}
if ($package.Architecture -ne 'Multi' -And $package.Architecture -eq 'x86' -And $Isx86 -eq $FALSE) {
continue;
}
if ([string]::IsNullOrEmpty($Version) -And ($null -eq $LatestVersion -Or $LatestVersion -lt $package.Version)) {
[Version]$LatestVersion = [Version]$package.Version;
$InstallPackage = $package;