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 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++) { 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) {