Commit ddf8304 1 parent 5d948e0 commit ddf8304 Copy full SHA for ddf8304
File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,10 @@ function Get-InstalledVersion {
57
57
if (Test-Path $appPath - PathType Container) {
58
58
# TODO: Keep only scoop-install.json
59
59
$arr = @ ((Get-ChildItem " $appPath \*\install.json" ), (Get-ChildItem " $appPath \*\scoop-install.json" ))
60
- $result = ($arr | Sort-Object - Property LastWriteTimeUtc).Directory.Name -ne ' current'
60
+ $versions = @ (($arr | Sort-Object - Property LastWriteTimeUtc).Directory.Name)
61
+ $result = $versions | Where-Object { $_ -ne ' current' } | Where-Object { $_ -notlike ' _*.old*' }
61
62
}
62
63
63
- # Edge case when there is only 'current'
64
- if ($result -is [bool ]) { $result = @ () }
65
-
66
64
return $result
67
65
}
68
66
}
@@ -91,8 +89,10 @@ function Select-CurrentVersion {
91
89
92
90
if (Test-Path " $appPath \current" - PathType Container) {
93
91
$currentVersion = (installed_manifest $AppName ' current' $Global ).version
92
+ # Get version from link target in case of nightly
93
+ if ($currentVersion -eq ' nightly' ) { $currentVersion = ((Get-Item " $appPath \current" ).Target | Get-Item ).BaseName }
94
94
} else {
95
- $installedVersion = Get-InstalledVersion - AppName $AppName - Global:$Global
95
+ $installedVersion = @ ( Get-InstalledVersion - AppName $AppName - Global:$Global )
96
96
$currentVersion = if ($installedVersion ) { $installedVersion [-1 ] } else { $null }
97
97
}
98
98
You can’t perform that action at this time.
0 commit comments