fix(confirm): ensure --show-output show the right answer (#853)

This commit is contained in:
Andrey Nering 2025-02-11 13:00:03 -08:00 committed by GitHub
commit 2b72e80297
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
}