Skip to content
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

Check if ~/.cargo/bin already on PATH #332

Closed
chriskrycho opened this issue Apr 17, 2016 · 1 comment · Fixed by #2387
Closed

Check if ~/.cargo/bin already on PATH #332

chriskrycho opened this issue Apr 17, 2016 · 1 comment · Fixed by #2387

Comments

@chriskrycho
Copy link

During first setup, especially for users who have used multirust or rustup in the past, it's possible they'll already have ~/.cargo/bin in their path configuration already. (It's already in my .profile, for example.) Instead of always adding it to the end of the user's profiles, maybe check the PATH for it first?

@brson
Copy link
Contributor

brson commented Apr 19, 2016

I think I like this idea, though it's a little clever and I'm wary of guessing the user's intent incorrectly. I guess we would check for whether PATH contains the substring ".cargo/bin" or ".cargo\bin".

This does seem like a niche case though - most people installing rustup should not have a preexisting install of Cargo from some other source.

There's also now an interactive option to opt out of modifying PATH for those that know they don't need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants