From 7b9ac79ab43690fa357958d76782a6cbb5e39430 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 11 Apr 2026 13:19:30 +0100 Subject: [PATCH] gui: remove flag.Lookup test guard around browser open The flag.Lookup("test.v") check existed to skip opening a browser during tests, but the tests don't exercise RunE, so this was never used. The --no-open-browser flag is sufficient on its own. --- cmd/gui/gui.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/gui/gui.go b/cmd/gui/gui.go index eb082e26f..fbe03bc38 100644 --- a/cmd/gui/gui.go +++ b/cmd/gui/gui.go @@ -5,7 +5,6 @@ import ( "archive/zip" "context" "embed" - "flag" "fmt" iofs "io/fs" "net/http" @@ -196,9 +195,9 @@ Use --no-auth to disable authentication entirely: loginURL := buildLoginURL(guiURL, rcURL, opt.Auth.BasicUser, opt.Auth.BasicPass, opt.NoAuth) fs.Logf(nil, "GUI available at %s", loginURL) - if flag.Lookup("test.v") == nil && !noOpenBrowser { + if !noOpenBrowser { if err := open.Start(loginURL); err != nil { - fs.Errorf(nil, "Failed to open GUI in browser: %v", err) + fs.Errorf(nil, "failed to open GUI in browser: %v", err) } }