From b934d64a4e9ce5cb906cad274137d4131cbbebe2 Mon Sep 17 00:00:00 2001 From: yetone Date: Sat, 10 Oct 2026 10:51:48 +0800 Subject: [PATCH] tests: TestNoCommandBypassesProc leaves out internal/testenv, which only tests import and which can't import proc (its tests import testenv); main was red since 2da8fbe4's testenv.Bun ran bun with os/exec --- internal/proc/proc_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/proc/proc_test.go b/internal/proc/proc_test.go index 0c4e3696..1db6f124 100644 --- a/internal/proc/proc_test.go +++ b/internal/proc/proc_test.go @@ -10,7 +10,9 @@ import ( ) // Every command magpie runs is made here, or the desktop app on Windows -// opens a console window for it again. +// opens a console window for it again. internal/testenv is left out: only +// tests import it, never the app, and it can't import proc, whose own tests +// import it. func TestNoCommandBypassesProc(t *testing.T) { root, _ := filepath.Abs(filepath.Join("..", "..")) bare := regexp.MustCompile(`\bexec\.Command(Context)?\(`) @@ -19,7 +21,7 @@ func TestNoCommandBypassesProc(t *testing.T) { return err } if d.IsDir() { - if path != root && (strings.HasPrefix(d.Name(), ".") || d.Name() == "node_modules" || path == filepath.Join(root, "internal", "proc")) { + if path != root && (strings.HasPrefix(d.Name(), ".") || d.Name() == "node_modules" || path == filepath.Join(root, "internal", "proc") || path == filepath.Join(root, "internal", "testenv")) { return filepath.SkipDir } return nil