diff --git a/cmd/explore.go b/cmd/explore.go index cf6ce934..14cf3258 100644 --- a/cmd/explore.go +++ b/cmd/explore.go @@ -204,6 +204,11 @@ func Explore(cmd *cobra.Command, args []string) error { return fmt.Errorf("error reading keyboard input: %w", err) } + // This spinner will spin forever as the command shuts down as this could + // take a couple of seconds and we want the user to know it's doing + // something + _, _ = pterm.DefaultSpinner.WithWriter(multi.NewWriter()).Start("Shutting down") + return nil } diff --git a/cmd/root.go b/cmd/root.go index caaae35d..dff77bbf 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -488,8 +488,14 @@ func getOauthToken(ctx context.Context, oi sdp.OvermindInstance, requiredScopes } var token *oauth2.Token + var urlToOpen string + if deviceCode.VerificationURIComplete != "" { + urlToOpen = deviceCode.VerificationURIComplete + } else { + urlToOpen = deviceCode.VerificationURI + } - _ = browser.OpenURL(deviceCode.VerificationURI) // nolint:errcheck // we don't care if the browser fails to open + _ = browser.OpenURL(urlToOpen) // nolint:errcheck // we don't care if the browser fails to open pterm.Print( markdownToString(MAX_TERMINAL_WIDTH, fmt.Sprintf( beginAuthMessage,