From 435890eee2a200a31f115e49ad6f3d931cb7ec28 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 23 Sep 2025 14:32:19 +0200 Subject: [PATCH] Update core.func --- misc/core.func | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/misc/core.func b/misc/core.func index c74d244f..00c2d6e6 100644 --- a/misc/core.func +++ b/misc/core.func @@ -152,16 +152,15 @@ silent() { fi } -# Check if the shell is using bash # Check if the shell is using bash shell_check() { local CURRENT_SHELL - CURRENT_SHELL="$(ps -p $$ -o comm=)" + CURRENT_SHELL="$(ps -p $$ -o comm= | xargs)" # trims whitespace echo "DEBUG: Detected shell is: '$CURRENT_SHELL'" - if [[ "$CURRENT_SHELL" != "bash" && "$CURRENT_SHELL" != "-bash" ]]; then + if [[ -z "$BASH_VERSION" ]]; then clear - msg_error "Your default shell is currently not set to Bash. To use these scripts, please switch to the Bash shell." + msg_error "This script requires bash, but current shell is: $CURRENT_SHELL" echo -e "\nExiting..." sleep 2 exit 1