mirror of https://github.com/databricks/cli.git
5b819cd982
## Changes #629 introduced a change to autopopulate the host from .databrickscfg if the user is logging back into a host they were previously using. This did not respect the DATABRICKS_CONFIG_FILE env variable, causing the flow to stop working for users with no .databrickscfg file in their home directory. This PR refactors all config file loading to go through one interface, `databrickscfg.GetDatabricksCfg()`, and an auxiliary `databrickscfg.GetDatabricksCfgPath()` to get the configured file path. Closes #655. ## Tests ``` $ databricks auth login --profile abc Error: open /Users/miles/.databrickscfg: no such file or directory $ ./cli auth login --profile abc Error: cannot load Databricks config file: open /Users/miles/.databrickscfg: no such file or directory $ DATABRICKS_CONFIG_FILE=~/.databrickscfg.bak ./cli auth login --profile abc Databricks Host: https://asdf ``` |
||
---|---|---|
.codegen | ||
.github | ||
.vscode | ||
bundle | ||
cmd | ||
docs | ||
folders | ||
internal | ||
libs | ||
python | ||
.codegen.json | ||
.gitattributes | ||
.gitignore | ||
.goreleaser.yaml | ||
CHANGELOG.md | ||
LICENSE | ||
Makefile | ||
NOTICE | ||
README.md | ||
go.mod | ||
go.sum | ||
main.go | ||
main_test.go |
README.md
Databricks CLI
This project is in Public Preview.
Documentation about the full REST API coverage is available in the docs folder.
Documentation is available at https://docs.databricks.com/dev-tools/cli/databricks-cli.html.
Installation
This CLI is packaged as a dependency-free binary executable and may be located in any directory. See https://github.com/databricks/cli/releases for releases and the docs pages for installation instructions.
Authentication
This CLI follows the Databricks Unified Authentication principles.
You can find a detailed description at https://github.com/databricks/databricks-sdk-go#authentication.