Skip to content

Commit

Permalink
Exit successfully on "update not yet available"
Browse files Browse the repository at this point in the history
  • Loading branch information
crazymerlyn committed May 16, 2017
1 parent a1c6be1 commit fdaf507
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/rustup-dist/src/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,9 @@ pub fn update_from_dist_<'a>(download: DownloadCfg<'a>,
// Proceed to try v1 as a fallback
(download.notify_handler)(Notification::DownloadingLegacyManifest);
}
Err(Error(ErrorKind::ChecksumFailed { .. }, _)) => {
return Ok(None)
}
Err(e) => return Err(e),
}

Expand Down
3 changes: 1 addition & 2 deletions tests/cli-v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ fn bad_sha_on_manifest() {
sha_bytes[..10].clone_from_slice(b"aaaaaaaaaa");
let sha_str = String::from_utf8(sha_bytes).unwrap();
rustup_utils::raw::write_file(&sha_file, &sha_str).unwrap();
expect_err(config, &["rustup", "default", "nightly"],
"checksum failed");
expect_ok(config, &["rustup", "default", "nightly"]);
});
}

Expand Down

0 comments on commit fdaf507

Please sign in to comment.