From e96ec186beeb5baf1c02bf54c57866f28fb0a8f5 Mon Sep 17 00:00:00 2001 From: Max Richter Date: Sun, 12 Sep 2021 16:36:44 +0200 Subject: [PATCH] fix: check for interactivity --- setup.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index c2234fa..4c114b7 100755 --- a/setup.sh +++ b/setup.sh @@ -1,9 +1,12 @@ #!/bin/bash cd "$(dirname "$0")" -INTERACTIVE=$(tty -s && echo "true" || echo "false") +INTERACTIVE=false + +if [[ $- == *i* ]] then + INTERACTIVE=true +fi -echo "Interactive: $INTERACTIVE" #Loading all the helper scripts . ./helpers/installer.sh --source-only