From 2248ac1e28bc2236d28dad3f90beee836256fea1 Mon Sep 17 00:00:00 2001 From: Weixie Cui Date: Sun, 24 May 2026 11:33:34 +0800 Subject: [PATCH] console/prompt: return err if err != nil --- console/prompt/prompter.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/console/prompt/prompter.go b/console/prompt/prompter.go index 5a0a89e76a..45a9efcc5e 100644 --- a/console/prompt/prompter.go +++ b/console/prompt/prompter.go @@ -143,10 +143,13 @@ func (p *terminalPrompter) PromptPassword(prompt string) (passwd string, err err // choice to be made, returning that choice. func (p *terminalPrompter) PromptConfirm(prompt string) (bool, error) { input, err := p.PromptInput(prompt + " [y/n] ") + if err != nil { + return false, err + } if len(input) > 0 && strings.EqualFold(input[:1], "y") { return true, nil } - return false, err + return false, nil } // SetHistory sets the input scrollback history that the prompter will allow