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
gum confirm --timeout never times out despite having a documented --timeout option.
Relevant excerpts from gum confirm --help
Usage: gum confirm [<prompt>] [flags]
Ask a user to confirm an action
Arguments:
[<prompt>] Prompt to display.
Flags:
--default Default confirmation action
--timeout=0 Timeout until confirm returns selected value or default if provided ($GUM_CONFIRM_TIMEOUT)
To Reproduce
Steps to reproduce the behavior:
This never times out:
❯ gum confirm --timeout=1s &&echo"timed out"
Repro but it's a .tape file:
Set TypingSpeed 0.1Output broken-main.gif
Set Shell zsh
Sleep 500ms
Type"git checkout main && git fetch upstream main && git rev-parse HEAD"
Enter
Type"date +%H:%M:%S.%1N && go run . confirm --timeout=1s --default='Yes' && echo 'Success'"
Enter
Sleep 4s
Ctrl+C
Type"date +%H:%M:%S.%1N"
Enter
Sleep 4s
Ctrl+D
Expected behavior
Confirm times out after the specified duration as described in the docs.
❯ ./gum confirm --timeout=1s &&echo"timed out"┃ Are you sure?┃┃ Yes Notimed out
Screenshots
Before
Gum timeout wrapped in an external timeout command. See that it does not stop at 1 second but stops at 5 per the wrapping command:
Describe the bug
gum confirm --timeout
never times out despite having a documented--timeout
option.Relevant excerpts from
gum confirm --help
To Reproduce
Steps to reproduce the behavior:
This never times out:
❯ gum confirm --timeout=1s && echo "timed out"
Repro but it's a
.tape
file:Expected behavior
Confirm times out after the specified duration as described in the docs.
Screenshots
Before
Gum timeout wrapped in an external
timeout
command. See that it does not stop at 1 second but stops at 5 per the wrapping command:After (using fix from #697)
Same call as before but gum times out at 1 second as expected:
Desktop (please complete the following information):
alacritty
is my terminal emulator,fish
my shellAdditional context
I have a unit tested fix up in #697.
The text was updated successfully, but these errors were encountered: