Documentation
¶
Overview ¶
Package cli provides helpers for locating the Databricks CLI binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FallbackCLIDirs = []string{
"/usr/local/bin",
"/opt/homebrew/bin",
"/opt/homebrew/sbin",
".local/bin",
"go/bin",
"bin",
}
FallbackCLIDirs lists install locations to probe when the CLI binary is not on PATH. Order matters: most-likely first. GUI-launched subprocesses (e.g. Claude Desktop invoking the credential helper) inherit launchd's minimal PATH (/usr/bin:/bin:/usr/sbin:/sbin), which omits all of these.
Functions ¶
func IsExecutableFile ¶
IsExecutableFile reports whether path refers to an executable file.
func ResolveDatabricksCLI ¶
ResolveDatabricksCLI returns an executable path for cmdName. Lookup order:
- Absolute or path-qualified cmdName → returned unchanged (back-compat for tests).
- $DATABRICKS_CLI env override, if set and executable.
- exec.LookPath(cmdName), which honors the inherited PATH.
- A scan of common install dirs (FallbackCLIDirs).
If none match, cmdName is returned unchanged so the eventual exec error surfaces with its original message.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.