Skip to content

Commit a271821

Browse files
committed
only remove directory if it exists
1 parent c346482 commit a271821

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ pub fn rustc(build: &Build, stage: u32, target: &str, out: &Path) {
181181
let out_dir = build.stage_out(&compiler, Mode::Librustc)
182182
.join(target).join("doc");
183183
let rustdoc = build.rustdoc(&compiler);
184-
if !up_to_date(&rustdoc, &out_dir.join("rustc/index.html")) {
184+
if !up_to_date(&rustdoc, &out_dir.join("rustc/index.html")) && out_dir.exists() {
185185
t!(fs::remove_dir_all(&out_dir));
186186
}
187187
let mut cargo = build.cargo(&compiler, Mode::Librustc, target, "doc");

0 commit comments

Comments
 (0)