Skip to content

Commit

Permalink
feat(scoop-import): install specific version when given (#5525)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxthunder committed Oct 16, 2023
1 parent e370a83 commit 2fa0e4f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 5 additions & 1 deletion libexec/scoop-import.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ foreach ($item in $import.apps) {
}

$app = if ($item.Source -in $bucket_names) {
"$($item.Source)/$($item.Name)"
if ($item.Version) {
"$($item.Source)/$($item.Name)@$($item.Version)"
} else {
"$($item.Source)/$($item.Name)"
}
} elseif ($item.Source -eq '<auto-generated>') {
"$($item.Name)@$($item.Version)"
} else {
Expand Down
5 changes: 2 additions & 3 deletions libexec/scoop-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,9 @@ $specific_versions_paths = $specific_versions | ForEach-Object {
$app, $bucket, $version = parse_app $_
if (installed_manifest $app $version) {
warn "'$app' ($version) is already installed.`nUse 'scoop update $app$(if ($global) { " --global" })' to install a new version."
continue
} else {
generate_user_manifest $app $bucket $version
}

generate_user_manifest $app $bucket $version
}
$apps = @(($specific_versions_paths + $difference) | Where-Object { $_ } | Sort-Object -Unique)

Expand Down

0 comments on commit 2fa0e4f

Please sign in to comment.