Rollup merge of #95885 - gimbles:patch-1, r=Mark-Simulacrum

Improve error message in case of missing checksum

# Fixes
#94217
This commit is contained in:
Dylan DPC 2022-04-13 17:35:32 +02:00 committed by GitHub
commit d449a63e93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,7 +70,11 @@ def get(base, url, path, checksums, verbose=False, do_verify=True, help_on_error
try:
if do_verify:
if url not in checksums:
raise RuntimeError("src/stage0.json doesn't contain a checksum for {}".format(url))
raise RuntimeError(("src/stage0.json doesn't contain a checksum for {}. "
"Pre-built artifacts might not available for this "
"target at this time, see https://doc.rust-lang.org/nightly"
"/rustc/platform-support.html for more information.")
.format(url))
sha256 = checksums[url]
if os.path.exists(path):
if verify(path, sha256, False):