Skip to content

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

Merged
caarlos0 merged 6 commits intomainfrom
timeouts
Nov 18, 2024
Merged

fix(confirm,choose,file,input): timeout handling#718
caarlos0 merged 6 commits intomainfrom
timeouts

Conversation

@caarlos0
Copy link
Copy Markdown
Contributor

  • 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>
Comment thread main.go Outdated
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Comment thread confirm/command.go Outdated
Comment thread internal/exit/exit.go Outdated
Comment thread main.go
Comment thread main.go
Comment thread main.go
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
@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