-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
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
feat: improve handling ctrl+c and timeouts #747
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's a draft, but I looked at it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, few questions
This works great for the Gum commands, though when working with a script (e.g. |
@bashbunni it does work, but the script might need the #!/bin/bash
set -euo pipefail
time=$(gum input --placeholder "Timeout (in minutes)")
gum spin --timeout "${time}m" --show-output -- ping -c 50 google.com
echo "Done"
these options are generally good to have on any scripts as they help preventing errors. |
ctrl+c
interrupt and exit properlycontext.Context
and exit properly