From e87342d3b704a113ef7d1160dc74a77c7e80dd41 Mon Sep 17 00:00:00 2001 From: DragonSlayer_14 Date: Sun, 6 Sep 2026 17:16:50 +0200 Subject: [PATCH] fix(install): reconnect stdin to tty for interactive TUI in piped execution Co-authored-by: Junie --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 9ed78c8..152d95f 100755 --- a/install.sh +++ b/install.sh @@ -130,12 +130,12 @@ main() { fi setup_cmd+=(./setup.sh "$@") - # Execute setup.sh with stdin connected to /dev/tty if stdin is piped (e.g. curl ... | bash) + # Reconnect stdin to /dev/tty before executing setup.sh if piped (e.g. curl ... | bash) if [[ ! -t 0 ]] && [[ -e /dev/tty ]] && ( : < /dev/tty ) 2>/dev/null; then - "${setup_cmd[@]}" < /dev/tty - else - "${setup_cmd[@]}" + exec < /dev/tty fi + + "${setup_cmd[@]}" } main "$@"