Fix install.sh prompt not showing when piped via stdin

Check for /dev/tty instead of stdin being a terminal, so the Y/n
prompt works with `cat install.sh | bash`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-03-10 18:31:34 -04:00
parent d5bd2c6046
commit 5501ba6fe7

View file

@ -144,7 +144,7 @@ fi
echo "" >&2
# --- Prompt to run setup wizard ---
if [ -t 0 ] && [ -t 2 ]; then
if [ -t 2 ] && [ -e /dev/tty ]; then
printf " ${BOLD}Run ${BOLD_CYAN}arc install${RESET}${BOLD} now to complete setup? [Y/n]${RESET} " >&2
read -r answer </dev/tty
case "$answer" in