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:
@@ -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 ---
|
||||
|
||||
Reference in New Issue
Block a user