From 2b72e8029773e474802b804b97346cdc640a7346 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Tue, 11 Feb 2025 13:00:03 -0800 Subject: [PATCH] fix(confirm): ensure `--show-output` show the right answer (#853) --- 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 }