rustup: `rustup show` should not force-install the default toolchain if it is not installed.
This behavior confused me:
$ rustup uninstall nightly-2018-04-01-x86_64-apple-darwin
info: uninstalling toolchain 'nightly-2018-04-01-x86_64-apple-darwin'
info: toolchain 'nightly-2018-04-01-x86_64-apple-darwin' uninstalled
$ rustup show
Default host: x86_64-apple-darwin
info: syncing channel updates for 'nightly-2018-04-01-x86_64-apple-darwin'
info: latest update on 2018-04-01, rust version 1.26.0-nightly (517f24025 2018-03-31)
info: downloading component 'rustc'
57.3 MiB / 57.3 MiB (100 %) 7.8 MiB/s ETA: 0 s
info: downloading component 'rust-std'
46.2 MiB / 46.2 MiB (100 %) 7.4 MiB/s ETA: 0 s
info: downloading component 'cargo'
3.0 MiB / 3.0 MiB (100 %) 1.5 MiB/s ETA: 0 s
info: downloading component 'rust-docs'
6.8 MiB / 6.8 MiB (100 %) 3.1 MiB/s ETA: 0 s
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
installed toolchains
--------------------
stable-x86_64-apple-darwin
nightly-i686-apple-darwin
nightly-x86_64-apple-darwin (default)
active toolchain
----------------
nightly-2018-04-01-x86_64-apple-darwin (directory override for '/Users/user/GitHub/unrust')
rustc 1.26.0-nightly (517f24025 2018-03-31)
Is rustup show supposed to actually start installing components? I was under the impression that it was just for listing out what you have installed.
I’m on a macOS 10.12.6 host.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 7
- Comments: 31 (22 by maintainers)
Commits related to this issue
- Update format of `show` and `show active-toolchain` This changes the format of `rustup show` to be in a more logical order, and changes the format of `rustup show active-toolchain` to match. Also, as... — committed to majaha/rustup by majaha 7 months ago
- Update format of `show` and `show active-toolchain` This changes the format of `rustup show` to be in a more logical order, and changes the format of `rustup show active-toolchain` to match. Also, as... — committed to majaha/rustup by majaha 7 months ago
- Update format of `show` and `show active-toolchain` This changes the format of `rustup show` to be in a more logical order, and changes the format of `rustup show active-toolchain` to match. Also, as... — committed to majaha/rustup by majaha 7 months ago
- Update format of `show` and `show active-toolchain` This changes the format of `rustup show` to be in a more logical order, and changes the format of `rustup show active-toolchain` to match. Also, as... — committed to majaha/rustup by majaha 7 months ago
- Update format of `show` and `show active-toolchain` This changes the format of `rustup show` to be in a more logical order, and changes the format of `rustup show active-toolchain` to match. Also, as... — committed to majaha/rustup by majaha 7 months ago
- Update format of `show` and `show active-toolchain` This changes the format of `rustup show` to be in a more logical order, and changes the format of `rustup show active-toolchain` to match. Also, as... — committed to majaha/rustup by majaha 7 months ago
I think we should break things. Not cavalierly, but carefully, perhaps even with an RFC. But we have ‘install’, and we can make that idempotent. We can make a version of install that honours toolchain files etc. But (ab)using show to trigger an install is just counter intuitive and will be an ongoing source of WTFs forever.
We should also make sure that ~/.rustup is not written to by show etc.
@kinnison Personally I think a command like
showshould never actually install something and change the user’s environment. That just seems very odd to me and I can’t think of another example of a tool that does something like that.