From 1ec28959c1c8d12fafaa58d371501a6c700b0c32 Mon Sep 17 00:00:00 2001 From: Hsiao-nan Cheung Date: Thu, 20 Oct 2022 17:24:00 +0800 Subject: [PATCH 1/3] fix(import): Fix `scoop import` command --- libexec/scoop-import.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libexec/scoop-import.ps1 b/libexec/scoop-import.ps1 index 7e3ec1c52c..1221e127bf 100644 --- a/libexec/scoop-import.ps1 +++ b/libexec/scoop-import.ps1 @@ -40,12 +40,14 @@ foreach ($item in $import.apps) { } else { '' } - $arch = if ('64bit' -in $info) { + $arch = if ('64bit' -in $info -and '64bit' -ne $def_arch) { ' --arch 64bit' - } elseif ('32bit' -in $info) { + } elseif ('32bit' -in $info -and '32bit' -ne $def_arch) { ' --arch 32bit' - } else { + } elseif ('arm64' -in $info -and 'arm64' -ne $def_arch) { ' --arch arm64' + } else { + '' } $app = if ($item.Source -in $bucket_names) { From aedb0ee4a49756cde2cc936777f932a4fad7c8cd Mon Sep 17 00:00:00 2001 From: Hsiao-nan Cheung Date: Thu, 20 Oct 2022 17:28:13 +0800 Subject: [PATCH 2/3] docs(chglog): Update CHANGELOG [skip ci] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 239ce3f108..09f8e58075 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - **decompress:** Use PS's default 'Expand-Archive()' ([#5185](https://github.com/ScoopInstaller/Scoop/issues/5185)) - **hash:** Fix SourceForge's hash extraction ([#5189](https://github.com/ScoopInstaller/Scoop/issues/5189)) - **decompress:** Trim ending '/' ([#5195](https://github.com/ScoopInstaller/Scoop/issues/5195)) +- **scoop-import:** Add correct architecture argument ([#5210](https://github.com/ScoopInstaller/Scoop/issues/5210)) ### Code Refactoring From 4950dc69649357b765653c538ea301b2ed824980 Mon Sep 17 00:00:00 2001 From: Hsiao-nan Cheung Date: Thu, 20 Oct 2022 20:38:09 +0800 Subject: [PATCH 3/3] Fix 'getopt' error --- lib/getopt.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/getopt.ps1 b/lib/getopt.ps1 index ce12aae9f5..74ffae7c52 100644 --- a/lib/getopt.ps1 +++ b/lib/getopt.ps1 @@ -25,7 +25,7 @@ function getopt($argv, $shortopts, $longopts) { } # ensure these are arrays - $argv = @($argv) + $argv = @($argv -split ' ') $longopts = @($longopts) for ($i = 0; $i -lt $argv.Length; $i++) {