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