mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
Auto merge of #55051 - matthiaskrgr:dist_msg, r=Mark-Simulacrum
boostrap: dist: if a file cannot be installed because it does not exist, print its name in the error message.
This commit is contained in:
@@ -1288,6 +1288,9 @@ fn install(&self, src: &Path, dstdir: &Path, perms: u32) {
|
||||
t!(fs::create_dir_all(dstdir));
|
||||
drop(fs::remove_file(&dst));
|
||||
{
|
||||
if !src.exists() {
|
||||
panic!("Error: File \"{}\" not found!", src.display());
|
||||
}
|
||||
let mut s = t!(fs::File::open(&src));
|
||||
let mut d = t!(fs::File::create(&dst));
|
||||
io::copy(&mut s, &mut d).expect("failed to copy");
|
||||
|
||||
Reference in New Issue
Block a user