Files
omarchycn/bin
5d3299fb94 Wait for the keypress ourselves instead of asking gum to (#8082)
* Wait for the keypress ourselves instead of asking gum to

gum 2.0 runs a spun command without the terminal attached, so the
`gum spin -- read -n 1` that held the presentation terminal open returned
at once. Every menu command that ended in a failure took its window down
with it before the error could be read, which is how a failed update
looked like a terminal that just quit.

Read the key directly. gum's own terminal query replies are still sitting
on the tty when the spinner stops, so drain those first or they answer the
prompt on the user's behalf.

The green dot reads better than the globe did, so the provisioning notice
uses it too and drops its spinner along the way.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Ask the terminal for itself before prompting on it

The /dev/tty node is there whether or not a terminal is behind it, so the
existence check passed on a headless run and left both reads failing with
"No such device or address". Open it instead.

Prompt on the terminal too, rather than stdout: a caller that redirects us
was sending the prompt to a file while the read waited on the terminal,
which looks like a hang with no instruction on screen.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 19:46:02 +02:00
..
2026-05-21 15:45:36 +02:00
2026-08-11 13:56:09 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-21 19:30:30 +02:00
2026-05-01 17:40:22 +02:00
2026-05-06 12:58:55 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-21 19:30:30 +02:00
2026-05-25 18:19:06 +02:00
2026-05-01 17:40:22 +02:00
2026-05-20 14:09:09 +02:00
2026-05-20 14:12:06 +02:00
2026-05-19 20:54:20 +02:00
2026-05-19 20:54:20 +02:00
2026-05-14 12:02:53 +02:00
2026-05-14 12:02:53 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-06-04 18:37:32 -04:00
2026-05-04 11:18:25 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00
2026-05-05 14:22:03 +02:00
2026-08-08 02:31:23 -07:00
2026-05-01 17:40:22 +02:00
2026-06-04 11:14:04 +02:00
2026-06-04 11:14:04 +02:00
2026-05-01 17:40:22 +02:00
2026-06-04 18:37:32 -04:00
2026-06-28 20:46:23 -04:00
2026-05-08 20:48:36 +02:00
2026-05-01 17:40:22 +02:00
2026-05-01 17:40:22 +02:00