diff --git a/CHANGELOG.md b/CHANGELOG.md index c8d3eb2bb7..57d0c51b4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - **installed:** Fix 'core/installed' that mark failed app as 'installed' ([#4650](https://github.com/ScoopInstaller/Scoop/issues/4650)) - **shim:** Fix PS1 shim error when in different drive in PS7 ([#4614](https://github.com/ScoopInstaller/Scoop/issues/4614)) - **shim:** Fix `sh` shim error in WSL ([#4637](https://github.com/ScoopInstaller/Scoop/issues/4637)) +- **versions:** Fix wrong version number when only one version dir ([#4679](https://github.com/ScoopInstaller/Scoop/issues/4679)) - **scoop-cleanup:** Remove apps other than current version ([#4665](https://github.com/ScoopInstaller/Scoop/issues/4665)) - **scoop-update:** Skip updating non git buckets ([#4670](https://github.com/ScoopInstaller/Scoop/issues/4670)) - **scoop-update:** Remove 'Done.' output ([#4672](https://github.com/ScoopInstaller/Scoop/issues/4672)) diff --git a/lib/versions.ps1 b/lib/versions.ps1 index d1437c7223..ac8c3a7db5 100644 --- a/lib/versions.ps1 +++ b/lib/versions.ps1 @@ -59,7 +59,7 @@ function Select-CurrentVersion { } else { $installedVersion = Get-InstalledVersion -AppName $AppName -Global:$Global if ($installedVersion) { - $currentVersion = $installedVersion[-1] + $currentVersion = @($installedVersion)[-1] } else { $currentVersion = $null }