Skip to content

Commit ebd0821

Browse files
ChrisDentonsyphar
authored andcommitted
Revert "freeze used rustup version to 1.27.1, don't self-update rustup"
This reverts commit 9941bc8.
1 parent 05ee219 commit ebd0821

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/toolchain.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ impl DistToolchain {
4949
self.name(),
5050
"--profile",
5151
workspace.rustup_profile(),
52-
"--no-self-update",
5352
])
5453
.run()
5554
.with_context(|| format!("unable to install toolchain {} via rustup", self.name()))?;

src/tools/rustup.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ use std::fs::{self, File};
88
use std::io;
99
use tempfile::tempdir;
1010

11-
// we're using an old version of rustup, since rustup 1.28 is broken for rustwide for now.
12-
// We'll try to either fix rustup, or adapt rustwide to fix this, until then, we'll use this version.
13-
// see https://github.com/rust-lang/rustup/issues/4224
14-
static RUSTUP_VERSION: &str = "1.27.1";
11+
static RUSTUP_BASE_URL: &str = "https://static.rust-lang.org/rustup/dist";
1512

1613
pub(crate) struct Rustup;
1714

@@ -40,10 +37,10 @@ impl Tool for Rustup {
4037
fs::create_dir_all(workspace.rustup_home())?;
4138

4239
let url = format!(
43-
"https://static.rust-lang.org/rustup/archive/{version}/{target}/rustup-init{exe_suffix}",
44-
version = RUSTUP_VERSION,
45-
target = crate::HOST_TARGET,
46-
exe_suffix = EXE_SUFFIX
40+
"{}/{}/rustup-init{}",
41+
RUSTUP_BASE_URL,
42+
crate::HOST_TARGET,
43+
EXE_SUFFIX
4744
);
4845
let mut resp = workspace
4946
.http_client()
@@ -78,7 +75,11 @@ impl Tool for Rustup {
7875

7976
fn update(&self, workspace: &Workspace, _fast_install: bool) -> anyhow::Result<()> {
8077
Command::new(workspace, &RUSTUP)
81-
.args(&["update", MAIN_TOOLCHAIN_NAME, "--no-self-update"])
78+
.args(&["self", "update"])
79+
.run()
80+
.context("failed to update rustup")?;
81+
Command::new(workspace, &RUSTUP)
82+
.args(&["update", MAIN_TOOLCHAIN_NAME])
8283
.run()
8384
.with_context(|| format!("failed to update main toolchain {}", MAIN_TOOLCHAIN_NAME))?;
8485
Ok(())

0 commit comments

Comments
 (0)