fix: Invert err nil check for opening Git URL (#5077)

Thanks @kconley-sq! 🥳
This commit is contained in:
Kyle Carberry
2022-11-14 20:10:23 -06:00
committed by GitHub
parent b5181aacd7
commit 50b5becfb0
+1 -1
View File
@@ -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)