Skip to content

Commit 604f662

Browse files
crawfxrdjackpot51
authored andcommitted
scripts: Remove explicit rustup self update
Commit 7d6a15e ("Convert toolchain file to TOML syntax") switched from the bare toolchain file to the TOML-based one for better management of the toolchain and components used. Commit cf7fc2c ("scripts: Update rustup or inform user of env vars") added an explicit `rustup self update` because there were still cases, a year later, of people not having a rustup new enough to support the TOML-based toolchain file. Now 2 years after that, it should be safe to drop the explicit self update. The TOML format has widespread adoption and rustup now self updates by default. This should allow distro-provided rustup, which disables the self update feature, to work if it is already installed in place of the one downloaded from https://rustup.rs. Signed-off-by: Tim Crawford <tcrawford@system76.com>
1 parent 4e3ade8 commit 604f662

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

scripts/install-rust.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ set -Ee
1111
RUSTUP_NEW_INSTALL=0
1212

1313
# NOTE: rustup is used to allow multiple toolchain installations.
14-
if command -v rustup >/dev/null 2>&1; then
15-
rustup self update
16-
else
14+
if ! command -v rustup >/dev/null 2>&1; then
1715
RUSTUP_NEW_INSTALL=1
1816
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
1917
| sh -s -- -y --default-toolchain stable

0 commit comments

Comments
 (0)