From 0d2fd2c5bb34326ff1aff2973297be61f3a2b8f9 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 7 Oct 2026 01:48:37 +0200 Subject: [PATCH] Remove everything a check run by hand leaves, the toolchain's files under its HOME too --- cmd/mesh-controller/check_here.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/mesh-controller/check_here.go b/cmd/mesh-controller/check_here.go index bb39aad..ad027ee 100644 --- a/cmd/mesh-controller/check_here.go +++ b/cmd/mesh-controller/check_here.go @@ -193,8 +193,9 @@ func ownerRepoOf(remote string) (string, string, string) { // when it is not this one. func removeWorkspace(image, workspace, user string) { if image != "" && user != fmt.Sprintf("%d:%d", os.Getuid(), os.Getgid()) { - _ = exec.Command("docker", "run", "--rm", "--user", user, "--volume", workspace+":"+workspace, image, - "rm", "-rf", workspace+"/check", workspace+"/go-cache", workspace+"/go-modules", workspace+"/git-credentials").Run() + // Everything in it — the check's HOME is the workspace, so the toolchain's own files are there too. + _ = exec.Command("docker", "run", "--rm", "--user", user, "--volume", workspace+":/workspace", image, + "sh", "-c", "rm -rf /workspace/* /workspace/.[!.]*").Run() } _ = os.RemoveAll(workspace) }