-
Notifications
You must be signed in to change notification settings - Fork 891
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 update stable" fails when custom CARGO_HOME is set #2309
Comments
If your custom CARGO_HOME does not match the one rustup was installed with then this kind of behaviour is expected. If it does, then perhaps something has broken the hardlinks to confuse |
Behaviour confirmed after having to re-install EDIT : Error on my part, I forgot to export the The phrasing of the installer suggests that it should be possible to modify those paths after the fact.
Steps to reproduce with CARGO_HOME=$HOME/.config/cargo
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # installer from rustup.rs
# [...] go through the installer which should install rustup in ~/.config/cargo
$CARGO_HOME/bin/rustup update # SUCCESS
# Try default location without the CARGO_HOME variable set
mv ~/.config/cargo ~/.cargo
unset CARGO_HOME
~/.cargo/bin/rustup update # SUCCESS
# Changing CARGO_HOME to something different than during install
CARGO_HOME=$HOME/.cargo2
mv ~/.cargo ~/.cargo2
$CARGO_HOME/bin/rustup update # FAIL
# error: rustup is not installed at '/home/<user>/.cargo' Installed & Active Toolchainnightly-x86_64-unknown-linux-gnu Installed targetsx86_64-unknown-linux-gnu |
I am unable to replicate this issue as you describe it. Since you don't export Is it the case perhaps that you were not exporting |
You are correct. I had it in my My problem was originally that cargo, rustup etc. don't follow the xdg standarts. 😞 I don't seem to reproduce this issue though, I think it can be closed @lucasholder ? |
yep looks like, shell specific behaviour |
Problem
I am using a custom
CARGO_HOME
and when I dorustup update stable
, I get this error:error: rustup is not installed at '/Users/lucas/.my-cargo-dir
.Steps
CARGO_HOME=/tmp/somedir rustup update stable
Possible Solution(s)
Notes
Output of
rustup --version
:rustup 1.21.1 (7832b2e 2019-12-20)
Output of
rustup show
:Default host: x86_64-apple-darwin
rustup home: /Users/lucas/.rustup
installed toolchains
stable-x86_64-apple-darwin
nightly-x86_64-apple-darwin
installed targets for active toolchain
wasm32-unknown-unknown
x86_64-apple-darwin
active toolchain
stable-x86_64-apple-darwin (default)
rustc 1.43.0 (4fb7144ed 2020-04-20)
The text was updated successfully, but these errors were encountered: