From 1f22d121442f5e07e9b3336e6b44c5db2fc5c891 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Tue, 11 Feb 2025 17:50:24 -0300 Subject: [PATCH] fix(confirm): ensure `--show-output` show the right answer --- confirm/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confirm/command.go b/confirm/command.go index ed5cf6e17..abbfad932 100644 --- a/confirm/command.go +++ b/confirm/command.go @@ -49,6 +49,7 @@ func (o Options) Run() error { if err != nil { return fmt.Errorf("unable to confirm: %w", err) } + m = tm.(model) if o.ShowOutput { confirmationText := m.negative @@ -58,7 +59,6 @@ func (o Options) Run() error { fmt.Println(m.prompt, confirmationText) } - m = tm.(model) if m.confirmation { return nil }