Skip to content

Commit ad59158

Browse files
authored
Merge pull request #505 from davvid/ignore-cleanup
build: allow the cleanup step to be non-fatal
2 parents 21f89e7 + 19cf120 commit ad59158

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ fn compile_probe(rustc_bootstrap: bool) -> bool {
203203
// file in OUT_DIR, which causes nonreproducible builds in build systems
204204
// that treat the entire OUT_DIR as an artifact.
205205
if let Err(err) = fs::remove_dir_all(&out_subdir) {
206-
if err.kind() != ErrorKind::NotFound {
206+
if err.kind() != ErrorKind::NotFound && err.kind() != ErrorKind::DirectoryNotEmpty {
207207
eprintln!("Failed to clean up {}: {}", out_subdir.display(), err);
208208
process::exit(1);
209209
}

0 commit comments

Comments
 (0)