mirror of
https://github.com/charmbracelet/gum
synced 2026-03-14 21:55:45 +01:00
fix: detect timeout error and apply default option (#888)
This commit is contained in:
parent
e43b277240
commit
e292bbf049
1 changed files with 2 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package confirm
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
|
|
@ -46,7 +47,7 @@ func (o Options) Run() error {
|
|||
tea.WithOutput(os.Stderr),
|
||||
tea.WithContext(ctx),
|
||||
).Run()
|
||||
if err != nil {
|
||||
if err != nil && ctx.Err() != context.DeadlineExceeded {
|
||||
return fmt.Errorf("unable to confirm: %w", err)
|
||||
}
|
||||
m = tm.(model)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue