-
Notifications
You must be signed in to change notification settings - Fork 895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rustup doesn't play well with uppercased proxy names on Windows #3848
Comments
@jaraco Thanks for filing this issue! We already have native Windows on ARM64 installers so there's no reason to use x64 emulation. See #3840 for more details. TLDR: would you mind trying the installation again with https://static.rust-lang.org/rustup/dist/aarch64-pc-windows-msvc/rustup-init.exe? |
You bet! Same issue exists:
|
FYI, I don't have any reason to think this issue is related to the ARM architecture. |
So this error comes from here: https://github.com/rust-lang/rustup/blob/master/src/bin/rustup-init.rs#L142 It looks like it happens because for whatever reason, arg0 gets uppercased in the process of how you are running it. It seems pretty surprising in the sense that we've had not (as far as I know) seen any reports about this before. The maintainer for edex-ui suggests that zsh is doing something potentially surprising in GitSquared/edex-ui#1124 (comment), pointing at https://github.com/zsh-users/zsh/blob/00d20ed15e18f5af682f0daec140d6b8383c479a/Src/exec.c#L465, not sure how/why that would lead to uppercasing? I suppose this could potentially be fixed by doing something like |
Indeed. I've confirmed that xonsh is uppercasing the command:
That 'locate_binary' is called here. To be sure, I assumed that I've traced the issue to I see other places where names are uppercased (on Windows only). I do think I agree - xonsh should not be altering the command as entered by the user. I'll follow up with xonsh on that. But I also believe that rustup should honor operating system conventions. That is, if the user enters
Probably rustup should be lenient to that approach. Interestingly, Powershell seems to be smarter and resolves the wrong case to the case of the matched filename and succeeds:
|
Shells should really not be uppercasing commands but that said rustup could use |
Agreed. And I've filed the bug and PR to fix the issue in xonsh/xonsh#5469. The question that remains is - should programs be lenient to the case of the command in the case the shell passes the name typed by the user (such as in the cmd.exe example above). That is, if the user types I recommend close as won't fix. |
@jaraco Alright, let's close it first and see whether something else will bring us back here (if anything, the fix on our side would be trivial) 🙏 |
Verification
Problem
Attempting to install Rust on Windows 11 for ARM, I was following the directions at https://www.rust-lang.org/tools/install. I downloaded the 64-bit installer, then attempted to run it from my shell/terminal that I had open, but the invocation failed with an error:
Invoking the command from powershell or Explorer, the command succeeds, so isn't a blocking issue, but it would be nice not to have an obscure error when trying to invoke from my preferred shell.
Steps
https --download -q static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe
.zsh
orxonsh
, invoke./rustup-init
(or.\rustup-init
or./rustup-init.exe
).Possible Solution(s)
In GitSquared/edex-ui#1124 (comment), another user was having a similar issue, which seems to be rooted in how ARG0 is set/cleared between processes. Perhaps the same technique could be applied to rustup-init.
In #3237, a similar issue was encountered when
rust-analyzer
was integrated intorustup
, which was seemingly fixed by adding rust-analyzer to the rustup book, but I'm unsure how that's relevant or how it would apply to rustup-init.Notes
No response
Rustup version
Installed toolchains
n/a
OS version
The text was updated successfully, but these errors were encountered: