From da1c75c3a6666e94d087cd55d0709328ce906442 Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Sat, 13 Oct 2018 23:33:10 +0200 Subject: boostrap: dist: if a file cannot be installed because it does not exist, print its name in the error message. --- src/bootstrap/lib.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/bootstrap') diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 247727762d1..c09de02ab51 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -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"); -- cgit 1.4.1-3-g733a5