From 21e6fd90782bce7f73c58d370d23e2eb92bdfb4a Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Fri, 13 Mar 2026 00:45:01 +0100 Subject: [PATCH] feat: reopen stdin from terminal when script is piped --- setup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.sh b/setup.sh index c71b3f29..a6fd20f4 100644 --- a/setup.sh +++ b/setup.sh @@ -970,6 +970,11 @@ trap cleanup INT TERM # ── Main ──────────────────────────────────────────────────────────────────── main() { + # When piped (e.g. curl | bash), reopen stdin from the terminal + if [[ ! -t 0 ]]; then + exec < /dev/tty + fi + # Check for minimum terminal size get_term_size if [[ $TERM_COLS -lt 60 || $TERM_ROWS -lt 20 ]]; then