diff --git a/scripts/Unix/generate-environment-file.sh b/scripts/Unix/generate-environment-file.sh index e3fe3061..eeac970d 100755 --- a/scripts/Unix/generate-environment-file.sh +++ b/scripts/Unix/generate-environment-file.sh @@ -8,8 +8,16 @@ get_random_hex() { } prompt_default() { - printf "Enter %s [%s]: " "$1" "$2" - read -r response + if [ -t 0 ]; then + printf "Enter %s [%s]: " "$1" "$2" + if read -r response &2 - printf "Press Enter to continue or Ctrl+C to abort" - read -r + if [ -t 0 ]; then + printf "Press Enter to continue or Ctrl+C to abort: " + read -r _ &2 + fi fi EVIBES_PROJECT_NAME=$(prompt_default EVIBES_PROJECT_NAME eVibes)