[email protected]: installation script did not execute correctly.
Bug Report
Package Name: rustup-msvc
Current Behaviour
$ scoop install rustup-msvc Installing 'rustup-msvc' (1.25.1) [64bit] from main bucket rustup-init.exe (9.6 MB) Checking hash of rustup-init.exe ... ok. Running installer script... ERROR Exit code was 1! Linking C:\Apps\Scoop\apps\rustup-msvc\current => C:\Apps\Scoop\apps\rustup-msvc\1.25.1 Persisting .cargo Persisting .rustup 'rustup-msvc' (1.25.1) was installed successfully!
Invoke-ExternalCommand -Path \"$dir\\rustup-init.exe\" -Args \"-y --no-modify-path --default-host $host_arch-pc-windows-msvc\" | Out-Null
The command is not executed successfully, The output logs are as follows:
error: error: Found argument '- ' which wasn't expected, or isn't valid in this context
USAGE:
rustup-init.exe -y
For more information try --help
System details
Windows version: [11]
OS architecture: [64bit]
PowerShell version: [7.2.6]
Additional software: [Git]
Scoop Configuration
{
"rootPath": "C:\\Apps\\Scoop",
"globalPath": "C:\\Apps\\ScoopG",
"lastUpdate": "2022-08-13T21:10:13.4347710+08:00",
"proxy": "127.0.0.1:7890",
"SCOOP_REPO": "https://github.com/ScoopInstaller/Scoop",
"SCOOP_BRANCH": "master"
}
This might be due to https://github.com/ScoopInstaller/Scoop/pull/5065
/cc @lewis-yeung
As is mentioned in ScoopInstaller/Scoop#5065, in old versions, the argument passing has some drawbacks.
In the past, due to the arbitraryness of arguments, we are not able to handle all cases where arguments may contain spaces, quotes or other special characters for every automatic installer script that uses
Invoke-ExternalCommand.
Now we have automatic argument quoting (with any necessary escaping). For this case it should use an array that contains all arguments:
"Invoke-ExternalCommand -Path \"$dir\\rustup-init.exe\" -Args @('-y', '--no-modify-path', '--default-host', \"$host_arch-pc-windows-msvc\") | Out-Null"
Alright, fixed https://github.com/ScoopInstaller/Main/commit/8923026df57d2547f8b7e64bc02ed9008c6b190a