-
Notifications
You must be signed in to change notification settings - Fork 894
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
In a directory with an override, display override after succesful default change #1648
Comments
Note we're about to make Advising the user that even after changing the default a directory override is present sounds like a good idea to me. I think it should do it for all methods that have precedence on the default, as described in https://github.com/rust-lang/rustup.rs/blob/1.16.0/README.md#override-precedence. So if there is a rust-toolchain file or a RUSTUP_TOOLCHAIN env var. |
@dwijnand At present, the canis@latrans:~/rustup.rs$ rustup default
Default toolchain: stable-x86_64-unknown-linux-gnu
Current override: nightly-x86_64-unknown-linux-gnu |
@carols10cents Opened a PR. I liked your idea better, so the change will result in some lines of logging being output to notify you of an override being set, and why it is set. |
Awesome, thank you @lazorgator !!!! |
The problem I am trying to solve
I have some directories where I've set overrides and some directories where I haven't set overrides, and I don't remember which directories have overrides or not.
I'll be working on a project and want to change the Rust version I'm currently using, so I'll run:
Which outputs:
So I say, "cool, I'm using beta now!" and go about
cargo build
ing, etc.In a directory without an override, I am indeed using beta.
In a directory with an override, I get the same output, but I am not using beta (necessarily), I'm using the override. So I
cargo build
thinking I'm on beta, but I'm not.The solution I'd like
If I'm in a directory without an override, I'd like the current behavior of
rustup default
to stay the same.If I'm in a directory with an override, I'd like the output of
rustup default
to remind me that I have an override and that I'm not using the default that I just changed. Something like:If this is a personal problem of mine, I can script my way around it, but I wanted to file this and see what others thought and then potentially submit a PR if other folks have this problem too.
The text was updated successfully, but these errors were encountered: