Merge pull request #660 from Icinga:fix/broken_update_icinga_command

Fix: Update-Icinga not updating to latest or specified version

Fixes `Update-Icinga` not updating to the latest available version for a component and specifying `-Version` is updating to the latest one instead of the given one instead
This commit is contained in:
Lord Hepipud 2023-08-11 16:24:40 +02:00 committed by GitHub
commit df0d24b8c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -14,6 +14,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
### Bugfixes
* [#659](https://github.com/Icinga/icinga-powershell-framework/pull/659) Fixes configuration writer which publishes invalid Icinga plain configuration files
* [#660](https://github.com/Icinga/icinga-powershell-framework/pull/660) Fixes `Update-Icinga` not updating to the latest available version for a component and specifying `-Version` is updating to the latest one instead of the given one instead
## 1.11.0 (2023-08-01)

View file

@ -22,9 +22,9 @@ function Update-Icinga()
continue;
}
if ([string]::IsNullOrEmpty($Version) -eq $FALSE){
$NewVersion = $Component.LatestVersion;
} else {
$NewVersion = $Component.LatestVersion;
if ([string]::IsNullOrEmpty($Version) -eq $FALSE) {
$NewVersion = $Version;
}