Skip to content

Commit 2b72e80

Browse files
authored
fix(confirm): ensure --show-output show the right answer (#853)
1 parent 93f6857 commit 2b72e80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

confirm/command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ func (o Options) Run() error {
4949
if err != nil {
5050
return fmt.Errorf("unable to confirm: %w", err)
5151
}
52+
m = tm.(model)
5253

5354
if o.ShowOutput {
5455
confirmationText := m.negative
@@ -58,7 +59,6 @@ func (o Options) Run() error {
5859
fmt.Println(m.prompt, confirmationText)
5960
}
6061

61-
m = tm.(model)
6262
if m.confirmation {
6363
return nil
6464
}

0 commit comments

Comments
 (0)