Private
Public Access
1
0

Fix stdin hijack when run via curl | bash

When piped through curl, stdin is the download stream, not the
terminal. This caused setup wizard prompts to read empty input
(the 'rogue enter' bug). Fix: reopen stdin from /dev/tty before
any interactive prompts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
constantprojects
2026-02-24 08:50:39 -07:00
parent eca351057b
commit dcbcf799c4

View File

@@ -50,6 +50,13 @@ show_progress() {
fi
}
# --- Reclaim stdin for interactive prompts ---
# When run via `curl ... | bash`, stdin is the pipe. Reopen it from
# the terminal so read prompts (setup wizard, confirmations) work.
if [ ! -t 0 ]; then
exec < /dev/tty
fi
header "WebsiteBox Installer"
# --- Check for root/sudo ---