From fac78589fd639b7493d64b2b29c2915eab28142a Mon Sep 17 00:00:00 2001 From: Max Eshleman Date: Tue, 19 Nov 2024 08:07:48 -0800 Subject: [PATCH] assume user is logged in if RENDER_API_KEY is set (#138) --- pkg/tui/views/login.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/tui/views/login.go b/pkg/tui/views/login.go index 7ea6f4e..c0d71ca 100644 --- a/pkg/tui/views/login.go +++ b/pkg/tui/views/login.go @@ -178,6 +178,10 @@ func (l *LoginView) View() string { } func isAlreadyLoggedIn(ctx context.Context) bool { + if cfg.GetAPIKey() != "" { + return true + } + c, err := client.NewDefaultClient() if err != nil { return false