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

Query RUSTUP_HOME #1627

Closed
gnzlbg opened this issue Jan 29, 2019 · 5 comments · Fixed by #1933
Closed

Query RUSTUP_HOME #1627

gnzlbg opened this issue Jan 29, 2019 · 5 comments · Fixed by #1933

Comments

@gnzlbg
Copy link
Contributor

gnzlbg commented Jan 29, 2019

Is there a way to query the rustup home from rustup ? Right now I am checking if the RUSTUP_HOME variable is defined, and using that if its the case, and otherwise using ${HOME}/.rustup, but I'd prefer if there was a rustup --home command that would just print whatever rustup is using.

@kinnison
Copy link
Contributor

kinnison commented Feb 5, 2019

Not an entirely implausible thing to want, I'll ponder what the nicest way to have that incorporated would be. Thanks for the suggestion.

@fisherdarling
Copy link
Contributor

@kinnison I'd like to try and tackle this!

I'm thinking I'll need to add an .arg in the cli() function. Then if that arg is present, print what we think the path is and return early from rustup_mode::main()?

@kinnison
Copy link
Contributor

kinnison commented Jul 3, 2019

I think I'd probably prefer a patch which added the RUSTUP_HOME to the output of rustup show and added rustup show home akin to rustup show active-toolchain.

Do you think you could do that instead?

@fisherdarling
Copy link
Contributor

So something like:

$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/fisher/.rustup

...

And

$ rustup show home
/home/fisher/.rustup

?

I can try that!

@kinnison
Copy link
Contributor

kinnison commented Jul 3, 2019

@fisherdarling Yep that kind of thing indeed.

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