Skip to content

Commit b1bdf04

Browse files
committed
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.
2 parents 2462a2d + da1c75c commit b1bdf04

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/bootstrap/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,9 @@ impl Build {
12881288
t!(fs::create_dir_all(dstdir));
12891289
drop(fs::remove_file(&dst));
12901290
{
1291+
if !src.exists() {
1292+
panic!("Error: File \"{}\" not found!", src.display());
1293+
}
12911294
let mut s = t!(fs::File::open(&src));
12921295
let mut d = t!(fs::File::create(&dst));
12931296
io::copy(&mut s, &mut d).expect("failed to copy");

0 commit comments

Comments
 (0)