From ddfbf3d9f86e453bd3db31429bb4253c786fd6ef Mon Sep 17 00:00:00 2001 From: argenis de la rosa Date: Sat, 28 Feb 2026 22:17:53 -0500 Subject: [PATCH] fix(bootstrap): fallback when /dev/stdin is unreadable in guided mode --- scripts/bootstrap.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index cee7251ad..4bd1ac7a5 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -423,11 +423,18 @@ string_to_bool() { } guided_input_stream() { - if [[ -t 0 ]]; then + # Some constrained Linux containers report interactive stdin but deny opening + # /dev/stdin directly. Probe readability before selecting it. + if [[ -t 0 ]] && (: /dev/null; then echo "/dev/stdin" return 0 fi + if [[ -t 0 ]] && (: /dev/null; then + echo "/proc/self/fd/0" + return 0 + fi + if (: /dev/null; then echo "/dev/tty" return 0