Skip to content

Commit e602a92

Browse files
authored
Remove no-op promptui.SearchPrompt assignment in warehouse picker (#5168)
## Summary `SelectWarehouse` in `libs/databrickscfg/cfgpickers/warehouses.go` contains: ```go promptui.SearchPrompt = "Search: " ``` This assigns the package-level global to its own default. promptui declares it [here](https://github.com/manifoldco/promptui/blob/v0.9.0/select.go#L184) as `var SearchPrompt = "Search: "` — byte-identical to what we set. The line is the only write to `promptui.SearchPrompt` in the repo. It was introduced in #4170 alongside the template-init warehouse picker. The original warehouse picker (`AskForWarehouse`, added in #956) never had it, which suggests it's copy-paste residue rather than a deliberate override. ## Test plan - [x] `go build ./libs/databrickscfg/cfgpickers/` - [x] No behavior change expected — value matches promptui's default This pull request and its description were written by Isaac.
1 parent e95f44f commit e602a92

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

libs/databrickscfg/cfgpickers/warehouses.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
"github.com/databricks/databricks-sdk-go/httpclient"
1616
"github.com/databricks/databricks-sdk-go/service/sql"
1717
"github.com/fatih/color"
18-
"github.com/manifoldco/promptui"
1918
)
2019

2120
var ErrNoCompatibleWarehouses = errors.New("no compatible warehouses")
@@ -225,7 +224,6 @@ func SelectWarehouse(ctx context.Context, w *databricks.WorkspaceClient, descrip
225224
if description != "" {
226225
cmdio.LogString(ctx, description)
227226
}
228-
promptui.SearchPrompt = "Search: "
229227
warehouseId, err := cmdio.SelectOrdered(ctx, items, "warehouse\n")
230228
if err != nil {
231229
return "", err

0 commit comments

Comments
 (0)