When installing rustup-init 0.14.0 with Homebrew, it fails because it is a relative symlink.
Environment:
$ which rustup-init
/usr/local/bin/rustup-init
$ readlink /usr/local/bin/rustup-init
../Cellar/rustup-init/1.14.0/bin/rustup-init
CARGO_HOME=~/.config/cargo
RUSTUP_HOME=~/.config/rustup
Here is what happens:
$ rm -rf ~/.config/rustup/ ~/.config/cargo/
$ rustup-init -y --no-modify-path
error: failed to set permissions for '~/.config/cargo/bin/rustup'
info: caused by: No such file or directory (os error 2)
After this, rustup is a symlink pointing to the same target as the original symlink, which is wrong.
$ readlink ~/.config/cargo/bin/rustup
../Cellar/rustup-init/1.14.0/bin/rustup-init
If I run the command again, it now tries to symlink from the wrong symlink again.
$ rustup-init -y --no-modify-path
error: could not create link from '../Cellar/rustup-init/1.14.0/bin/rustup-init' to '~/.config/cargo/bin/rustup'
info: caused by: File exists (os error 17)
This is probably an error in utils::current_exe() since it doesn't resolve the path correctly (or at all).
When installing
rustup-init0.14.0 with Homebrew, it fails because it is a relative symlink.Environment:
Here is what happens:
After this,
rustupis a symlink pointing to the same target as the original symlink, which is wrong.$ readlink ~/.config/cargo/bin/rustup ../Cellar/rustup-init/1.14.0/bin/rustup-initIf I run the command again, it now tries to symlink from the wrong symlink again.
This is probably an error in
utils::current_exe()since it doesn't resolve the path correctly (or at all).