We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug I should be able to use errors.Is to check the error returned by the context after p.Run. But that's broken.
errors.Is
p.Run
Setup Please complete the following information along with version numbers, if applicable.
To Reproduce Steps to reproduce the behavior: See source code
Source Code
ctx := context.WithDeadline(context.Background, time.Second*5) p := tea.NewProgram(model, tea.WithContext(ctx)) _, err := p.Run() if errors.Is(err, context.DeadlineExceeded) { // Handle timeout }
Expected behavior If the five seconds pass during run (in this example), that if block should be executed.
Additional context
bubbletea/tea.go
Line 598 in 9f015c5
On L598, change the format to "%w: %w", and that should work.
"%w: %w"
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
I should be able to use
errors.Is
to check the error returned by the context afterp.Run
. But that's broken.Setup
Please complete the following information along with version numbers, if applicable.
To Reproduce
Steps to reproduce the behavior:
See source code
Source Code
Expected behavior
If the five seconds pass during run (in this example), that if block should be executed.
Additional context
bubbletea/tea.go
Line 598 in 9f015c5
On L598, change the format to
"%w: %w"
, and that should work.The text was updated successfully, but these errors were encountered: