Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/dist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1234,11 +1234,15 @@ async fn try_update_from_dist_(
Ok(None) => return Ok(None),
Err(err) => {
match err.downcast_ref::<RustupError>() {
Some(RustupError::ChecksumFailed { .. }) => return Ok(None),
Some(RustupError::DownloadNotExists { .. }) => {
// Proceed to try v1 as a fallback
debug!("manifest not found; trying legacy manifest");
}
// Includes `ChecksumFailed`: if the v2 manifest exists but its
// contents do not match the published `.sha256`, surface the
// integrity failure as an error rather than silently treating
// the toolchain as up to date. The v1 fallback path below
// already does the same.
_ => return Err(err),
}
}
Expand Down
Loading