From ab74d04e60628a9fca9f3c8aaca3b9263b87cbef Mon Sep 17 00:00:00 2001 From: Kazuki Chigita Date: Sat, 21 Mar 2026 23:55:23 +0900 Subject: [PATCH] Fix install.sh to read user input from /dev/tty When run via curl | bash, stdin is the script itself, so read gets garbage. Reading from /dev/tty ensures the user is prompted correctly. Co-Authored-By: Claude Opus 4.6 (1M context) --- Scripts/install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Scripts/install.sh b/Scripts/install.sh index 5e7510b..d65f82e 100755 --- a/Scripts/install.sh +++ b/Scripts/install.sh @@ -15,8 +15,9 @@ trap cleanup EXIT echo "xpbc installer" echo "" -# Ask user for install directory -read -rp "Install directory [$DEFAULT_INSTALL_DIR]: " INSTALL_DIR +# Read from /dev/tty so this works even when piped via curl | bash +printf "Install directory [%s]: " "$DEFAULT_INSTALL_DIR" +read -r INSTALL_DIR < /dev/tty || true INSTALL_DIR="${INSTALL_DIR:-$DEFAULT_INSTALL_DIR}" # Expand ~ to $HOME