Skip to content

Commit f52caa7

Browse files
committed
Do not delete bootstrap.exe on Windows during clean
Windows does not allow deleting currently running executables
1 parent 090dac0 commit f52caa7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/bootstrap/clean.rs

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ pub fn clean(build: &Build, all: bool) {
2121
} else {
2222
rm_rf(&build.out.join("tmp"));
2323
rm_rf(&build.out.join("dist"));
24+
// Only delete the bootstrap executable on non-Windows systems
25+
// Windows does not allow deleting a currently running executable
26+
#[cfg(not(windows))]
2427
rm_rf(&build.out.join("bootstrap"));
2528

2629
for host in &build.hosts {

0 commit comments

Comments
 (0)