From f52caa76f9204b1341b59adad3d6323f4ca35292 Mon Sep 17 00:00:00 2001 From: Ryan Levick Date: Tue, 16 Feb 2021 10:35:15 +0100 Subject: [PATCH] Do not delete bootstrap.exe on Windows during clean Windows does not allow deleting currently running executables --- src/bootstrap/clean.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bootstrap/clean.rs b/src/bootstrap/clean.rs index 9b9df36e7dc..6026a000c30 100644 --- a/src/bootstrap/clean.rs +++ b/src/bootstrap/clean.rs @@ -21,6 +21,9 @@ pub fn clean(build: &Build, all: bool) { } else { rm_rf(&build.out.join("tmp")); rm_rf(&build.out.join("dist")); + // Only delete the bootstrap executable on non-Windows systems + // Windows does not allow deleting a currently running executable + #[cfg(not(windows))] rm_rf(&build.out.join("bootstrap")); for host in &build.hosts {