diff options
| author | bors <bors@rust-lang.org> | 2018-10-14 11:56:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-10-14 11:56:09 +0000 |
| commit | b1bdf04c97dd6631c627fe1a9d7fe2bb68e35dfd (patch) | |
| tree | 1150476c3b7223752e1dcb03b970857f50b961de | |
| parent | 2462a2de8c72e70fca250abe29255519b5fb892d (diff) | |
| parent | da1c75c3a6666e94d087cd55d0709328ce906442 (diff) | |
| download | rust-b1bdf04c97dd6631c627fe1a9d7fe2bb68e35dfd.tar.gz rust-b1bdf04c97dd6631c627fe1a9d7fe2bb68e35dfd.zip | |
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.
| -rw-r--r-- | src/bootstrap/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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"); |
