From 71b083c9ad467137b61ab039d917a4801e77c042 Mon Sep 17 00:00:00 2001 From: Matthew Mellor Date: Mon, 9 Mar 2026 21:18:17 -0500 Subject: [PATCH] fix(container): read interactive input from /dev/tty for curl-pipe-bash When run via `curl | bash`, stdin is consumed by the script content so interactive prompts silently fail. Read from /dev/tty instead, matching the pattern used by rustup, nvm, and other curl-pipe-bash installers. Co-Authored-By: Claude Opus 4.6 --- scripts/devrail-init.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/scripts/devrail-init.sh b/scripts/devrail-init.sh index 5f91bd2..3461ae9 100755 --- a/scripts/devrail-init.sh +++ b/scripts/devrail-init.sh @@ -45,6 +45,12 @@ warn() { printf '\033[0;33m⚠\033[0m %s\n' "$1"; } error() { printf '\033[0;31m✗\033[0m %s\n' "$1" >&2; } ask() { printf '\033[0;36m?\033[0m %s ' "$1"; } +# Read user input from /dev/tty so interactive mode works when piped via +# curl | bash (where stdin is consumed by the script content). +prompt_read() { + read -r "$@"