From c111c5a56240f5291cae481a1706d83734156260 Mon Sep 17 00:00:00 2001 From: Nick Z <2420177+nickzelei@users.noreply.github.com> Date: Tue, 14 Mar 2023 10:55:57 -0700 Subject: [PATCH 1/2] dont exit on login webbrowser error --- internal/utils/login_utils.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/utils/login_utils.go b/internal/utils/login_utils.go index 11966f0..6f03b22 100644 --- a/internal/utils/login_utils.go +++ b/internal/utils/login_utils.go @@ -179,9 +179,11 @@ func OAuthLogin(ctx context.Context) error { }() authorizeUrl := authClient.GetAuthorizeUrl(Scopes, state, redirectUri, nil) + + // if this fails, we should instead print out the URL and continue onward. err = webbrowser.Open(authorizeUrl) if err != nil { - return err + fmt.Println("There was an issue opening the web browser, proceed to the following url to finish logging in to Nucleus", authorizeUrl) } select { From 910db71f1b93c8a45f7a0a0d8ad85941184dc953 Mon Sep 17 00:00:00 2001 From: Nick Z <2420177+nickzelei@users.noreply.github.com> Date: Tue, 14 Mar 2023 10:56:54 -0700 Subject: [PATCH 2/2] remove comment --- internal/utils/login_utils.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/utils/login_utils.go b/internal/utils/login_utils.go index 6f03b22..35ada16 100644 --- a/internal/utils/login_utils.go +++ b/internal/utils/login_utils.go @@ -180,7 +180,6 @@ func OAuthLogin(ctx context.Context) error { authorizeUrl := authClient.GetAuthorizeUrl(Scopes, state, redirectUri, nil) - // if this fails, we should instead print out the URL and continue onward. err = webbrowser.Open(authorizeUrl) if err != nil { fmt.Println("There was an issue opening the web browser, proceed to the following url to finish logging in to Nucleus", authorizeUrl)