From: Bjørn Erik Pedersen Date: Mon, 24 Nov 2025 18:04:33 +0000 (+0100) Subject: github: Make the clean commands work X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=18a2afa5190092009886d00352fdacaa2d4b0b8d;p=brevno-suite%2Fhugo github: Make the clean commands work --- 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