From 6799e664eb9f95cd58d810841c19db7601051bcd Mon Sep 17 00:00:00 2001 From: Sabine Schmaltz Date: Wed, 5 Apr 2023 18:13:58 +0200 Subject: [PATCH] conditionally connect /dev/tty only when environment var TTY=1 --- shell/install.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/shell/install.sh b/shell/install.sh index f848c17325a..6b04fc1e576 100755 --- a/shell/install.sh +++ b/shell/install.sh @@ -186,14 +186,20 @@ usage() { echo "using '--fresh' or '--dev'" } +# Conditionally connect /dev/tty when +# the environment variable TTY is set to 1 +TTY=${TTY-0} R= prompt() { - # expects to be called as prompt "Do you want to do this? [Y/n]" + # expects to be called as prompt "Do you want to do this? [Y/n] " printf "$1" - read R