Keep the Copy URL migration's browser prompt visible (#6842)
gum draws its confirm UI on stderr, so the migration's `2>/dev/null` threw away the whole prompt while gum still held the terminal in raw mode reading keys. With a browser open, an update stopped after "Running migration (1786643346)" on an unpainted screen with no way to tell it was waiting for an answer. Nothing else in the repo suppresses gum's stderr; the redirect only ever hid gum's own error in the no-terminal case, where the migration already explains itself on stderr before deferring. Fixes #6841 Claude-Session: https://claude.ai/code/session_01So4yKzTDdJJp7orjnF8i1J Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
5e5197a081
commit
df708831b6
@@ -134,12 +134,14 @@ if (( ! ${#pending[@]} )) && ! unverified_repairs_exist; then
|
||||
fi
|
||||
|
||||
# A running browser holds Preferences in memory and rewrites the file on exit,
|
||||
# reverting the repair, so ask for the windows to be closed first. Without a
|
||||
# terminal to ask in, gum fails; then — as on decline — fail so the migration
|
||||
# stays pending, and the login notifier keeps prompting until a rerun goes
|
||||
# through with browsers closed.
|
||||
# reverting the repair, so ask for the windows to be closed first. gum draws
|
||||
# the prompt on stderr, so it must stay attached: suppressing it leaves gum
|
||||
# waiting for a keypress behind an unpainted screen. Without a terminal to ask
|
||||
# in, gum fails; then — as on decline — fail so the migration stays pending,
|
||||
# and the login notifier keeps prompting until a rerun goes through with
|
||||
# browsers closed.
|
||||
while browsers_running; do
|
||||
if ! gum confirm "Close all browser windows to repair the Copy URL shortcut, then continue" 2>/dev/null; then
|
||||
if ! gum confirm "Close all browser windows to repair the Copy URL shortcut, then continue"; then
|
||||
echo "A running browser would undo the Copy URL shortcut repair." >&2
|
||||
echo "Close all browser windows, then run: omarchy-migrate" >&2
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user