From 9cf341302eac404813eef1de4e45d8605a8985e0 Mon Sep 17 00:00:00 2001 From: Kynan Ware <47394200+BagToad@users.noreply.github.com> Date: Tue, 8 Apr 2025 12:03:55 -0600 Subject: [PATCH] refactor(prompter): explicit return values --- internal/prompter/prompter.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/prompter/prompter.go b/internal/prompter/prompter.go index f1900c751..556fa6f4c 100644 --- a/internal/prompter/prompter.go +++ b/internal/prompter/prompter.go @@ -156,7 +156,11 @@ func (p *speechSynthesizerFriendlyPrompter) Password(prompt string) (string, err ) err := form.Run() - return result, err + if err != nil { + return "", err + } + + return result, nil } func (p *speechSynthesizerFriendlyPrompter) Confirm(prompt string, defaultValue bool) (bool, error) { @@ -230,7 +234,10 @@ func (p *speechSynthesizerFriendlyPrompter) InputHostname() (string, error) { ) err := form.Run() - return result, err + if err != nil { + return "", err + } + return result, nil } func (p *speechSynthesizerFriendlyPrompter) MarkdownEditor(prompt, defaultValue string, blankAllowed bool) (string, error) {