Skip to content

Commit 2ed7768

Browse files
committed
freeze used rustup version to 1.27.1, don't self-update rustup
1 parent a345a36 commit 2ed7768

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

src/toolchain.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ impl DistToolchain {
4949
self.name(),
5050
"--profile",
5151
workspace.rustup_profile(),
52+
"--no-self-update",
5253
])
5354
.run()
5455
.with_context(|| format!("unable to install toolchain {} via rustup", self.name()))?;
@@ -365,6 +366,7 @@ impl Toolchain {
365366
"--toolchain",
366367
&toolchain_name,
367368
name,
369+
"--no-self-update"
368370
])
369371
.run()
370372
.with_context(|| {

src/tools/rustup.rs

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

11-
static RUSTUP_BASE_URL: &str = "https://static.rust-lang.org/rustup/dist";
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_BASE_URL: &str = "https://static.rust-lang.org/rustup/dist";
15+
static RUSTUP_VERSION: &str = "1.27.1";
1216

1317
pub(crate) struct Rustup;
1418

@@ -37,10 +41,10 @@ impl Tool for Rustup {
3741
fs::create_dir_all(workspace.rustup_home())?;
3842

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

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

0 commit comments

Comments
 (0)