From 1483636f0a03fcaab55b678fc2c4f75e4426fe69 Mon Sep 17 00:00:00 2001 From: Kyle Carberry Date: Tue, 15 Nov 2022 01:40:50 +0000 Subject: [PATCH] fix: Invert err nil check for opening Git URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks @kconley-sq! 🥳 --- cli/gitaskpass.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/gitaskpass.go b/cli/gitaskpass.go index 52af8b31da8a9..3930fe16c8a57 100644 --- a/cli/gitaskpass.go +++ b/cli/gitaskpass.go @@ -51,7 +51,7 @@ func gitAskpass() *cobra.Command { return xerrors.Errorf("get git token: %w", err) } if token.URL != "" { - if err := openURL(cmd, token.URL); err != nil { + if err := openURL(cmd, token.URL); err == nil { cmd.Printf("Your browser has been opened to authenticate with Git:\n\n\t%s\n\n", token.URL) } else { cmd.Printf("Open the following URL to authenticate with Git:\n\n\t%s\n\n", token.URL)