From 66e923261dc177866d294c4ac115fc700c80ba15 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Mon, 4 Dec 2023 15:40:52 +0000 Subject: [PATCH] Ask for host when .databrickscfg doesn't exist (#1041) ## Changes Ask for host when .databrickscfg doesn't exist This fixes a regression introduced by https://github.com/databricks/cli/pull/1003 --- cmd/auth/login.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/auth/login.go b/cmd/auth/login.go index bbc88c12..b0bc7a85 100644 --- a/cmd/auth/login.go +++ b/cmd/auth/login.go @@ -133,7 +133,7 @@ func setHost(ctx context.Context, profileName string, persistentAuth *auth.Persi return p.Name == profileName }) // Tolerate ErrNoConfiguration here, as we will write out a configuration as part of the login flow. - if !errors.Is(err, databrickscfg.ErrNoConfiguration) { + if err != nil && !errors.Is(err, databrickscfg.ErrNoConfiguration) { return err } if persistentAuth.Host == "" {