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.
This commit is contained in:
Nick Craig-Wood
2026-04-11 15:27:05 +01:00
parent 8ddccc1285
commit 7b9ac79ab4
+2 -3
View File
@@ -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)
}
}