Skip to content

Commit

Permalink
Do not prefill https:// in prompt for Databricks Host (#1364)
Browse files Browse the repository at this point in the history
## Changes
This PR is a minor UX improvement. By not autofilling the https://
prefix in Databricks Host we allow users to directly copy-paste from
their browser.

UX:
```
➜  cli git:(fix/copy-host) cli auth login
Databricks Profile Name: my-profile
Databricks Host (e.g. https://<databricks-instance>.cloud.databricks.com): https://foobar.cloud.databricks.com
Profile my-profile was successfully saved
```

## Tests
Manually.
  • Loading branch information
shreyas-goenka authored Apr 15, 2024
1 parent 1f1fe4c commit b71f853
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ GCP: https://docs.gcp.databricks.com/en/dev-tools/auth/index.html`,

func promptForHost(ctx context.Context) (string, error) {
prompt := cmdio.Prompt(ctx)
prompt.Label = "Databricks Host"
prompt.Default = "https://"
prompt.AllowEdit = true
prompt.Label = "Databricks Host (e.g. https://<databricks-instance>.cloud.databricks.com)"
// Validate?
host, err := prompt.Run()
if err != nil {
Expand Down

0 comments on commit b71f853

Please sign in to comment.