Skip to content
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

fix(confirm,choose,file,input): timeout handling #718

Merged
merged 6 commits into from
Nov 18, 2024
Merged

fix(confirm,choose,file,input): timeout handling #718

merged 6 commits into from
Nov 18, 2024

Conversation

caarlos0
Copy link
Member

  • some fields were not actually using the --timeout value
  • some fields had different behavior when a timeout did occur. On this matter, it seems to me the best way forward is to specifically say it timed out, and after how long
  • added exit status 124 (copied from timeout from coreutils) (fixes feature request: Different exit codes for --timeout and ^C #684)

so, tl;dr: this makes --timeout actually work everywhere it was already added, and then on timeout they'll all print timed out after <duration> and then exit 124

- some fields were not actually using the `--timeout` value
- some fields had different behavior when a timeout did occur. On this
  matter, it seems to me the best way forward is to specifically say it
  timed out, and after how long
- added exit status 124 (copied from `timeout` from coreutils) (fixes #684)

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
main.go Outdated Show resolved Hide resolved
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
confirm/command.go Outdated Show resolved Hide resolved
internal/exit/exit.go Outdated Show resolved Hide resolved
main.go Show resolved Hide resolved
main.go Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
caarlos0 and others added 4 commits November 18, 2024 09:16
Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 merged commit c868aa1 into main Nov 18, 2024
12 checks passed
@caarlos0 caarlos0 deleted the timeouts branch November 18, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature request: Different exit codes for --timeout and ^C
3 participants