mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
give a better error if renaming a temp file fails
This commit is contained in:
parent
0ffac661fa
commit
336ed0ebc7
@ -208,7 +208,10 @@ impl Config {
|
||||
Some(other) => panic!("unsupported protocol {other} in {url}"),
|
||||
None => panic!("no protocol in {url}"),
|
||||
}
|
||||
t!(std::fs::rename(&tempfile, dest_path));
|
||||
t!(
|
||||
std::fs::rename(&tempfile, dest_path),
|
||||
format!("failed to rename {tempfile:?} to {dest_path:?}")
|
||||
);
|
||||
}
|
||||
|
||||
fn download_http_with_retries(&self, tempfile: &Path, url: &str, help_on_error: &str) {
|
||||
@ -544,6 +547,10 @@ impl Config {
|
||||
key: &str,
|
||||
destination: &str,
|
||||
) {
|
||||
if self.dry_run() {
|
||||
return;
|
||||
}
|
||||
|
||||
let cache_dst = self.out.join("cache");
|
||||
let cache_dir = cache_dst.join(key);
|
||||
if !cache_dir.exists() {
|
||||
|
Loading…
Reference in New Issue
Block a user