From 3b11d0e75a425983ef4b20201e6ca11f6de97a5c Mon Sep 17 00:00:00 2001 From: DragonSlayer_14 Date: Thu, 6 Mar 2025 10:46:43 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20Passt=20die=20is=5Finteractive-Pr=C3=BCf?= =?UTF-8?q?ung=20an.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Utility/IsInteractive.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Utility/IsInteractive.sh b/Utility/IsInteractive.sh index 40390af..d7ba438 100644 --- a/Utility/IsInteractive.sh +++ b/Utility/IsInteractive.sh @@ -1,8 +1,10 @@ #!/bin/bash is_interactive() { - case $- in - *i*) return 1 ;; # Interaktive Shell - *) return 0 ;; # Nicht-interaktive Shell - esac + # Prüft, ob ein Terminal verfügbar ist + if [ -t 0 ] || [ -t 1 ] || [ -t 2 ]; then + return 0 + else + return 1 + fi }