Repository navigation
Release script: make yes/no prompts visible - #23
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #8. A bug I introduced in #20.
Bug
ask()sentread's errors to/dev/nullso it would not crash without a terminal. Butread -pprints 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/ttyitself, 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):yanswers yes andnanswers no;set -euo pipefail.bash -npasses.— Claude-Opus-5.5
🤖 Generated with Claude Code