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

Tell user if override is set in the environment after rustup default #1655

Merged
merged 2 commits into from
Mar 6, 2019

Conversation

das-sein
Copy link
Contributor

Resolves: #1648

Given: an environment with stable, beta, and nightly installed, and an override for beta set on the current working directory.

Previous Behavior:

canis@latrans:~/rustup.rs$ rustup default nightly
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.34.0-nightly (57d7cfc3c 2019-02-11)

New behavior:

canis@latrans:~/rustup.rs$ rustup default nightly
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.34.0-nightly (57d7cfc3c 2019-02-11)

info: using override set by current environment
info: beta-x86_64-unknown-linux-gnu (directory override for '/home/canis/rustup.rs')

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.

Could you please find if there's a test this could go in, or else add a test for this so that we don't risk losing the functionality.

Otherwise this is nice.

@das-sein
Copy link
Contributor Author

@kinnison No tests were affected, it seems, so I'll work on adding tests to cover this.

@das-sein
Copy link
Contributor Author

@kinnison Added a test.

tests/cli-rustup.rs Outdated Show resolved Hide resolved
@das-sein das-sein force-pushed the show-override-on-set-default branch from 5854d2a to a5dd425 Compare March 6, 2019 06:23
@das-sein
Copy link
Contributor Author

das-sein commented Mar 6, 2019

@dwijnand Warning message simplified, commit squashed.

Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

Thanks!

@dwijnand dwijnand merged commit 9d467f4 into rust-lang:master Mar 6, 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.

3 participants