As part of this change #629 an explicit call to databrickscfg.DefaultPath is used rather than checking for the env var DATABRICKS_CONFIG_FILE as per
|
configFile := os.Getenv("DATABRICKS_CONFIG_FILE") |
This causes a hard error that prevents any further execution if there is NOT a file called ~/.databrickscfg, regardless of the DATABRICKS_CONFIG_FILE setting.
This is also explicitly used here:
|
_, profiles, err := LoadProfiles(DefaultPath, MatchAllProfiles) |
Is there a better way to guard the use of this config default so that DATABRICKS_CONFIG_FILE is used if set regardless of which code path is run?
As part of this change #629 an explicit call to
databrickscfg.DefaultPathis used rather than checking for the env varDATABRICKS_CONFIG_FILEas percli/cmd/auth/profiles.go
Line 20 in 6b615cc
This causes a hard error that prevents any further execution if there is NOT a file called
~/.databrickscfg, regardless of theDATABRICKS_CONFIG_FILEsetting.This is also explicitly used here:
cli/libs/databrickscfg/profiles.go
Line 109 in 6b615cc
Is there a better way to guard the use of this config default so that
DATABRICKS_CONFIG_FILEis used if set regardless of which code path is run?