Description
Verification
- I searched for recent similar issues at https://github.com/rust-lang/rustup/issues?q=is%3Aissue+is%3Aopen%2Cclosed and found no duplicates.
- I am on the latest version of Rustup according to https://github.com/rust-lang/rustup/tags and am still able to reproduce my issue.
Problem
(Edited by @rami3l to better reflect the original issue)
Coming from https://internals.rust-lang.org/t/seeking-beta-testers-for-rustup-v1-28-0/22060.
With rustup v1.27.1, the following shell snippet can be used to force the installation of the default toolchain, or fall back on stable
when none is present:
rustup default || rustup default stable
When testing out the upcoming 1.28 release, however, I found that rustup default
is returning 0
even there's no such thing as the default toolchain, resulting in an unchanged default toolchain state.
I've noticed the suggestion provided in the post:
rustup show active-toolchain || rustup toolchain install
... but it doesn't really help with the use case above, since regardless in 1.27.1, the current stable branch (1.28-beta), it seems to always exit with code 0.
Steps
rustup default none
rustup default || rustup default stable
Possible Solution(s)
Should we find another workaround?
Notes
No response
Rustup version
* rustup 1.27.1 (1980-01-01)
* rustup 1.28.0 (7ccf717e6e1aee46f65cc6fea4132a3f0e37593b)
Installed toolchains
rustup 1.27.1
installed toolchains
--------------------
error: no default toolchain configured
rustup 1.28.0
installed toolchains
--------------------
active toolchain
----------------
no active toolchain
OS version
Both Darwin and Linux