Skip to content

Commit

Permalink
fix(confirm): ensure --show-output show the right answer (#853)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreynering authored Feb 11, 2025
1 parent 93f6857 commit 2b72e80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion confirm/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -58,7 +59,6 @@ func (o Options) Run() error {
fmt.Println(m.prompt, confirmationText)
}

m = tm.(model)
if m.confirmation {
return nil
}
Expand Down

0 comments on commit 2b72e80

Please sign in to comment.