From a394971dd75d8ad0287197553d3717dfb1d11b74 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 17 Apr 2026 02:06:51 +0900 Subject: cmd/mbf: do not abort cache acquisition during testing This can sometimes fire during testing due to how short the test is. Signed-off-by: Ophestra --- cmd/mbf/cache.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd/mbf/cache.go') diff --git a/cmd/mbf/cache.go b/cmd/mbf/cache.go index 16e77cbc..316e303d 100644 --- a/cmd/mbf/cache.go +++ b/cmd/mbf/cache.go @@ -4,6 +4,7 @@ import ( "context" "os" "path/filepath" + "testing" "hakurei.app/check" "hakurei.app/internal/pkg" @@ -53,6 +54,9 @@ func (cache *cache) open() (err error) { go func() { select { case <-cache.ctx.Done(): + if testing.Testing() { + return + } os.Exit(2) case <-done: -- cgit v1.3.1