Skip to content

Release script: make yes/no prompts visible - #23

Merged
kingdonb merged 2 commits into
mainfrom
fix/release-prompt-visible
Nov 18, 2026
Merged

kingdonb merged 2 commits into
mainfrom
fix/release-prompt-visible

Conversation

@kingdonb

Copy link
Copy Markdown
Owner

Part of #8. A bug I introduced in #20.

Bug

ask() sent read's errors to /dev/null so it would not crash without a terminal. But read -p prints its prompt on that same error stream, so every yes/no question was invisible. During the 0.0.9 release the script appeared to hang at "Device check (human)" while it was waiting for an answer.

Fix

ask() opens /dev/tty itself, prints the prompt there and reads the answer from it. If no terminal is available, the answer is "no", as before.

Verification

Tested under a pseudo-terminal (script):

  • the prompt is shown;
  • y answers yes and n answers no;
  • with no terminal it answers no and does not crash under set -euo pipefail.

bash -n passes.

— Claude-Opus-5.5

🤖 Generated with Claude Code

kingdonb and others added 2 commits November 17, 2026 19:43
ask() redirected read's stderr to /dev/null so it would not crash
without a terminal, but read -p prints its prompt on stderr. During the
0.0.9 run the device-check question was invisible and the script looked
hung. Prompts now go to /dev/tty directly; with no terminal the answer
is still "no".

Refs #8

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kingdonb
kingdonb merged commit 2bbbfac into main Nov 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant