Skip to content

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

Merged
dwijnand merged 2 commits intorust-lang:masterfrom
das-sein:show-override-on-set-default
Mar 6, 2019
Merged

Tell user if override is set in the environment after rustup default#1655
dwijnand merged 2 commits intorust-lang:masterfrom
das-sein:show-override-on-set-default

Conversation

@das-sein
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Author

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

@das-sein
Copy link
Copy Markdown
Author

@kinnison Added a test.

@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
Copy Markdown
Author

das-sein commented Mar 6, 2019

@dwijnand Warning message simplified, commit squashed.

Copy link
Copy Markdown
Contributor

@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