Skip to content

Commit e09127f

Browse files
authored
fix(versions): Fix wrong version number when only one version dir (#4679)
1 parent 37f5024 commit e09127f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- **installed:** Fix 'core/installed' that mark failed app as 'installed' ([#4650](https://github.com/ScoopInstaller/Scoop/issues/4650))
1818
- **shim:** Fix PS1 shim error when in different drive in PS7 ([#4614](https://github.com/ScoopInstaller/Scoop/issues/4614))
1919
- **shim:** Fix `sh` shim error in WSL ([#4637](https://github.com/ScoopInstaller/Scoop/issues/4637))
20+
- **versions:** Fix wrong version number when only one version dir ([#4679](https://github.com/ScoopInstaller/Scoop/issues/4679))
2021
- **scoop-cleanup:** Remove apps other than current version ([#4665](https://github.com/ScoopInstaller/Scoop/issues/4665))
2122
- **scoop-update:** Skip updating non git buckets ([#4670](https://github.com/ScoopInstaller/Scoop/issues/4670))
2223
- **scoop-update:** Remove 'Done.' output ([#4672](https://github.com/ScoopInstaller/Scoop/issues/4672))

lib/versions.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function Select-CurrentVersion {
5959
} else {
6060
$installedVersion = Get-InstalledVersion -AppName $AppName -Global:$Global
6161
if ($installedVersion) {
62-
$currentVersion = $installedVersion[-1]
62+
$currentVersion = @($installedVersion)[-1]
6363
} else {
6464
$currentVersion = $null
6565
}

0 commit comments

Comments
 (0)