console/prompt: use PromptInput in PromptConfirm method (#33445)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

This commit is contained in:
oooLowNeoNooo 2025-12-29 09:23:51 +01:00 committed by GitHub
parent 4531bfebec
commit b9702ed27b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -142,7 +142,7 @@ func (p *terminalPrompter) PromptPassword(prompt string) (passwd string, err err
// PromptConfirm displays the given prompt to the user and requests a boolean // PromptConfirm displays the given prompt to the user and requests a boolean
// choice to be made, returning that choice. // choice to be made, returning that choice.
func (p *terminalPrompter) PromptConfirm(prompt string) (bool, error) { func (p *terminalPrompter) PromptConfirm(prompt string) (bool, error) {
input, err := p.Prompt(prompt + " [y/n] ") input, err := p.PromptInput(prompt + " [y/n] ")
if len(input) > 0 && strings.EqualFold(input[:1], "y") { if len(input) > 0 && strings.EqualFold(input[:1], "y") {
return true, nil return true, nil
} }