Skip to content

Commit

Permalink
Fixes Icinga Agent MSI package fetching by ignoring RC packages
Browse files Browse the repository at this point in the history
Fixes #58
  • Loading branch information
LordHepipud committed Apr 16, 2020
1 parent 76cab25 commit d34b496
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/core/icingaagent/getters/Get-IcingaAgentMSIPackage.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ function Get-IcingaAgentMSIPackage()

foreach ($line in $Content) {
if ($line -like '*.msi*' -And $line -like "*$Architecture*") {
#Write-Host '#####' $line
$MSIPackage = $line.SubString(
$line.IndexOf('Icinga2-'),
$line.IndexOf('.msi') - $line.IndexOf('Icinga2-')
Expand All @@ -43,7 +42,7 @@ function Get-IcingaAgentMSIPackage()
break;
}
} elseif ($Version -eq 'latest') {
if ($line -like '*snapshot*') {
if ($line -like '*snapshot*' -Or $line -like '*-rc*') {
continue;
}
$UsePackage = $MSIPackage;
Expand Down

0 comments on commit d34b496

Please sign in to comment.