From 4604f9410c706da9d7b29184793055f23b3bf0fc Mon Sep 17 00:00:00 2001 From: Tobias Fried Date: Wed, 2 Oct 2024 16:11:47 -0600 Subject: [PATCH] fix(auth): allow opening browser to fail silently during auth (#435) --- cmd/lk/cloud.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/lk/cloud.go b/cmd/lk/cloud.go index 02fa72e3..231867aa 100644 --- a/cmd/lk/cloud.go +++ b/cmd/lk/cloud.go @@ -294,9 +294,7 @@ func tryAuthIfNeeded(ctx context.Context, cmd *cli.Command) error { // poll for keys fmt.Printf("Please confirm access by visiting:\n\n %s\n\n", authURL.String()) - if err := browser.OpenURL(authURL.String()); err != nil { - return err - } + browser.OpenURL(authURL.String()) // discard result; this will fail in headless environments var ak *ClaimAccessKeyResponse var pollErr error