diff --git a/CHANGELOG.md b/CHANGELOG.md index e15b8770f7..5f04143df2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ### Features -- **scoop-import:** Add support for resetting and updating of apps to be imported ([#5525](https://github.com/ScoopInstaller/Scoop/issues/5525)) +- **scoop-import:** Add support for resetting of apps to be imported ([#5525](https://github.com/ScoopInstaller/Scoop/issues/5525)) - **scoop-update:** Add support for parallel syncing buckets in PowerShell 7 and improve output ([#5122](https://github.com/ScoopInstaller/Scoop/issues/5122)) - **bucket:** Switch nirsoft bucket to ScoopInstaller/Nirsoft ([#5328](https://github.com/ScoopInstaller/Scoop/issues/5328)) - **config:** Support portable config file ([#5369](https://github.com/ScoopInstaller/Scoop/issues/5369)) diff --git a/libexec/scoop-import.ps1 b/libexec/scoop-import.ps1 index c7485739ed..f72c11cd7e 100644 --- a/libexec/scoop-import.ps1 +++ b/libexec/scoop-import.ps1 @@ -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 '') { "$($item.Name)@$($item.Version)" } else { diff --git a/libexec/scoop-install.ps1 b/libexec/scoop-install.ps1 index 994bb5b4cf..61983d688b 100644 --- a/libexec/scoop-install.ps1 +++ b/libexec/scoop-install.ps1 @@ -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)