Follow-up on #2915 and #4651.
The TLDR is that more and more packagers are skipping our installer rustup-init and unpacking rustup directly as if it were installed, with APT and Homebrew seemingly becoming the biggest two of them.
The idea here is to use simple heuristics: e.g. when the toolchain list is empty and the default toolchain is not set, we can print some basic commands to get the user started in rustup_mode (proxy_mode is already covered in #2915), such as a (maybe truncated) version of one of the messages in the above PRs.
The rationale behind this is that we will continue to privilege the user experience for the default flow and consider the rustup-direct flow advanced usage, but if minimal work can be done to unblock such users, we can also try to do something about it.
Many thanks to @dingxiangfei2009 and @Cloud0310 for the inspiration.
Follow-up on #2915 and #4651.
The TLDR is that more and more packagers are skipping our installer
rustup-initand unpackingrustupdirectly as if it were installed, with APT and Homebrew seemingly becoming the biggest two of them.The idea here is to use simple heuristics: e.g. when the toolchain list is empty and the default toolchain is not set, we can print some basic commands to get the user started in
rustup_mode(proxy_modeis already covered in #2915), such as a (maybe truncated) version of one of the messages in the above PRs.The rationale behind this is that we will continue to privilege the user experience for the default flow and consider the
rustup-direct flow advanced usage, but if minimal work can be done to unblock such users, we can also try to do something about it.Many thanks to @dingxiangfei2009 and @Cloud0310 for the inspiration.