Open fadelights opened 2 years ago
Changing CARGO_HOME
after installing Rustup is always going to be a bit fraught. In general I'd recommend setting it before you install Rust. If you want to support this kind of thing long term and believe you can come up with something clean then you will need to update the relevant bits in unix.rs
most likely.
Oh never mind then. I thought the issue could be fixed by updating some shell scripts. I'm still very much a Rust newbie and have a hard time understanding what's going on in the unix.rs
file.
Problem you are trying to solve
I downloaded
rustup
via the command provided on the official website:and then followed the on-screen instructions to install it. I then added the
CARGO_HOME
environment variable to my shell initialization script (.zshrc
in my case):only to find out that the line added to
.profile
or.zshenv
is already using the default location for cargo:and also the
env
script was adding the defaultbin
to my PATH:and so my
CARGO_HOME
environment variable was effectively doing nothing.Solution you'd like
I fixed the problem by modifying the line in my shell initialization script to look like below:
And also modified the
$CARGO_HOME/env
script:I think this would make a nice addition to the project: a cleaner
rustup
install management.Notes
Since this was a simple enough fix and I've been looking for a way to start contributing to open-source projects, I thought this might be a good first contribution for me. I searched through this repository and the
rustup-init.sh
file so that I could maybe find the relevant lines of code and fix them--with no success.If possible, I would like a little bit of guidance on which files to edit so that I can contribute this fix myself.