Skip to content

Commit

Permalink
Auto merge of rust-lang#55051 - matthiaskrgr:dist_msg, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
boostrap: dist: if a file cannot be installed because it does not exist, print its name in the error message.
  • Loading branch information
bors committed Oct 14, 2018
2 parents 2462a2d + da1c75c commit b1bdf04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1288,6 +1288,9 @@ impl Build {
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");
Expand Down

0 comments on commit b1bdf04

Please sign in to comment.