forked from heavy-duty/box
confirm() and uninstall_confirm() read the operator's answer with a bare 'read -r reply'. Ctrl-D makes read return non-zero, set -euo pipefail ends the run on that line, and the case below — the only thing that ever says "aborted." — is never reached. box exits 1 having printed nothing after the question it just asked. The cure is one token in each, 'read -r reply || die "aborted."', the same one heavy-duty/rig#43 applied to rig's credential prompts. The three answers a human can give (y, n, Ctrl-D) are now driven on a real pty via util-linux 'script'. They were structurally untested before — '[ -t 0 ]' sends a terminal-less suite to the refusal branch, so every existing check stopped there, which is how this survived four releases. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| box | ||