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

Display RUSTUP_HOME in rustup show and rustup show home #1933

Merged
merged 2 commits into from
Jul 28, 2019

Conversation

fisherdarling
Copy link
Contributor

This PR patches rustup show to also display the RUSTUP_HOME path:

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

It also adds a new subcommand, rustup show home that directly prints the path:

$ rustup show home
/home/fisher/.rustup

This closes #1627.

@fisherdarling
Copy link
Contributor Author

cc @kinnison

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a teeny bit of cleanup, and then needs a test to verify that it works properly.

src/cli/rustup_mode.rs Outdated Show resolved Hide resolved
src/cli/rustup_mode.rs Outdated Show resolved Hide resolved
@fisherdarling
Copy link
Contributor Author

Since rustup show always prints the home directory, I created another macro for_host_and_home! that would also get the config's rustupdir. If we should do this some other way, let me know.

@kinnison
Copy link
Contributor

kinnison commented Jul 3, 2019

This is starting to look good -- please fold the formatting fixes into the commits which are relevant, and fold the fix to what you originally submitted into the top commit, so that there are two commits - one for the feature, and one for the test updates.

@kinnison kinnison force-pushed the query_rustup_home branch from 65ee653 to eef4211 Compare July 28, 2019 12:10
@kinnison kinnison merged commit 7f3ce52 into rust-lang:master Jul 28, 2019
@bors bors mentioned this pull request Jul 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query RUSTUP_HOME
2 participants