From 18a2afa5190092009886d00352fdacaa2d4b0b8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 24 Nov 2025 19:04:33 +0100 Subject: [PATCH] github: Make the clean commands work --- magefile.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/magefile.go b/magefile.go index 99231a264..c37ef3fa7 100644 --- a/magefile.go +++ b/magefile.go @@ -4,6 +4,7 @@ package main import ( "bytes" + "cmp" "fmt" "os" "path" @@ -154,9 +155,6 @@ func Check() { // don't run two tests in parallel, they saturate the CPUs anyway, and running two // causes memory issues in CI. mg.Deps(TestRace) - if isCI() { - mg.Deps(CleanTest, UninstallAll) - } } func testGoFlags() string { @@ -196,10 +194,12 @@ func TestRace() error { return err } for _, pkg := range pkgs { + if err := cmp.Or(CleanTest(), UninstallAll()); err != nil { + return err + } if err := runCmd(env, goexe, "test", "-p", "2", "-race", pkg, "-tags", buildTags()); err != nil { return err } - mg.Deps(CleanTest, UninstallAll) } return nil -- 2.39.5