You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If I have custom signal capture behavior set up within my application, I want to be able to respect this even if I am running the spinner.
However, it seems that if the spinner is running, it hijacks my signal (exits the spinner without error) and pretends nothing has happened.
To Reproduce
Take this basic example, if while the spinner is running I hit ctrl+c it will exit with code 0 instead of the desired 123.
Expected behavior Tea based applications take in ProgramOptions one of which is WithoutSignalHandler which would allow using our own SignalHandler logic instead of hijacking it.
In func (s *Spinner) Run() error you're passing some default ProgramOptions
Would be beneficial to allow optional passing of tea.WithoutSignalHandler() (as well as maybe some of the other options); allowing for a more usable spinner.
Desktop (please complete the following information):
OS: macOS
Version Sonoma 14.6.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Not sure if my issue is similar, but the following code hijacks my ctrl+c, and when entered, the input is cancelled, but the program continues to run with no error returned.
Describe the bug
If I have custom signal capture behavior set up within my application, I want to be able to respect this even if I am running the
spinner
.However, it seems that if the spinner is running, it hijacks my signal (exits the spinner without error) and pretends nothing has happened.
To Reproduce
Take this basic example, if while the spinner is running I hit
ctrl+c
it will exit with code0
instead of the desired123
.This is compounded if we move the spinner into a loop it can't break out of, as we'll never be able to exit.
Expected behavior
Tea
based applications take inProgramOptions
one of which isWithoutSignalHandler
which would allow using our own SignalHandler logic instead of hijacking it.In
func (s *Spinner) Run() error
you're passing some defaultProgramOptions
Would be beneficial to allow optional passing of
tea.WithoutSignalHandler()
(as well as maybe some of the other options); allowing for a more usable spinner.Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: