Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Binary Logic #516

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions databricks/sdk/credentials_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,16 @@ def __init__(self, cfg: 'Config'):
if cfg.is_account_client:
args += ['--account-id', cfg.account_id]

import platform

cli_path = cfg.databricks_cli_path
if not cli_path:
cli_path = 'databricks'

# If the path is unqualified, look it up in PATH.
if cli_path.count("/") == 0:
cli_path = self.__class__._find_executable(cli_path)
if platform.system() == 'Windows':
# Check for both databricks.exe and databricks on Windows
cli_path = self.__class__._find_executable('databricks.exe')
else:
# For non-Windows, look for 'databricks'
cli_path = self.__class__._find_executable('databricks')

super().__init__(cmd=[cli_path, *args],
token_type_field='token_type',
Expand Down
Loading