We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 467b18d commit d2edef7Copy full SHA for d2edef7
1 file changed
core/dbio/api/auth.go
@@ -672,8 +672,14 @@ func generateRandomState() string {
672
return base64.URLEncoding.EncodeToString(b)
673
}
674
675
-// openBrowser opens the default browser to the given URL (unchanged from original).
+// openBrowser opens the default browser to the given URL.
676
+// If the BROWSER environment variable is set, it is used as the browser command.
677
func (a *AuthenticatorOAuth2) openBrowser(url string) error {
678
+ // Respect BROWSER env var for session-level browser override
679
+ if browserEnv := os.Getenv("BROWSER"); browserEnv != "" {
680
+ return exec.Command(browserEnv, url).Start()
681
+ }
682
+
683
var cmd string
684
var args []string
685
0 commit comments