cmdio: wrap promptui so callers stop importing it directly#5174
cmdio: wrap promptui so callers stop importing it directly#5174
Conversation
Introduces cmdio.SelectOptions/RunSelect and cmdio.PromptOptions/RunPrompt as a neutral surface around promptui, and migrates the four RunSelect callers and six Prompt callers across cmd/auth, cmd/configure, and libs/databrickscfg. Only libs/cmdio (and warehouses.go, deferred) import promptui directly now, making it cheap to swap the underlying library later. Co-authored-by: Isaac
The bundle_test profile-prompt assertion still depends on StartInSearchMode emitting "Search:" first, but the wording should point at the cmdio API now that callers no longer see promptui directly. Co-authored-by: Isaac
Approval status: pending
|
Summary
cmdio.SelectOptions/RunSelectandcmdio.PromptOptions/RunPromptas a neutral surface around promptui.RunSelectcallers and 6Promptcallers acrosscmd/auth,cmd/configure, andlibs/databrickscfg. After this change, promptui is only imported underlibs/cmdio, making a future swap of the prompt library a one-package change.This pull request and its description were written by Isaac.