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
This commit is contained in:
Fabian Jakobs 2023-12-04 15:40:52 +00:00 committed by GitHub
parent cdf29da27b
commit 66e923261d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 == "" {