-
Notifications
You must be signed in to change notification settings - Fork 894
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
Attempting to install rust with rustup-cli with $SHELL=zsh fails with assertion #1034
Comments
confirmed. |
Yeah, same issue for me. And here is the stack backtrace:
|
How do you change Shell? I tried |
What worked for me was setting |
Got it working by downloaded shell file and run them locally. First day with Rust here. Appreciate the help 👍 . |
Happening for me as well. Downloading the script and running it with --no-modify-path allows installation to proceed.
|
There are numerous paths rustup can take to solve this issue:
My vote goes to appending to the config of the running shell or |
We are seeing this a lot in |
Temporary fix is |
I'm willing to work on a PR if someone will describe the expected behavior. |
@rmbreak Let's go with your instincts since you seem to know what's up. Will you make a patch? |
@rmbreak actually, is there any harm in modifying both .profile and .zprofile? That's kind of what I intended. ISTM we can just delete this assertion and things should work. |
Oh that assertion is because the message displays just one modified script. To remove the assertion we'd have to make the pre_install_message smarter. |
I'm poking at a patch to remove that assertion, which I think is probably desirable regardless of whatever the ultimate strategy is. |
Ok here's the patch. I intend to land that to fix the immediate problem and as a general improvement, but I'm open to further debate about the right way to handle PATH. @rmbreak how do you feel about the maximal solution of modifying both .profile and .zprofile? |
Don't crash if modifying multiple profile files Fixes #1034 cc @rmbreak
@brson I think modifying .profile and the currently running shell's login config is fine. If a system has sh, zsh, and csh installed with rustup running under a csh instance, then rustup should update .login and .profile, ignoring .zprofile. When rustup gains support for other shells, such as csh, there will be different syntax for appending to PATH. In the case of csh: |
Message is
thread 'main' panicked at 'assertion failed:
(left == right)(left:
2, right:
1)', src/rustup-cli/self_update.rs:495
The line in question seems to check that there is only one unix shell profile file in the list to be checked. But if the user's
$SHELL
is zsh, the list will contain both.profile
and.zprofile
and fail with an assertion error.Setting the user's SHELL var to something non-zsh works around this problem temporarily.
The text was updated successfully, but these errors were encountered: