From d3e688ff1ec32f7b9602ca35349c77b50a66d0c7 Mon Sep 17 00:00:00 2001 From: "Jinming Wu, Patrick" Date: Sun, 31 Dec 2023 23:00:27 +0800 Subject: [PATCH] chore: shellcheck fix --- src/wslu-header | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wslu-header b/src/wslu-header index 205b5bd5..9645f333 100644 --- a/src/wslu-header +++ b/src/wslu-header @@ -40,7 +40,7 @@ fi # prevent bash -x set +x -bash_version_major=$(echo $BASH_VERSION | cut -d'.' -f1) +bash_version_major=$(echo "$BASH_VERSION" | cut -d'.' -f1) # pipeline content to pipe... if it is wslclip if [[ "$wslu_util_name" == "wslclip" ]]; then @@ -153,7 +153,7 @@ function error_echo { } # Check if the major version number is greater than 5 -if [ $(expr $bash_version_major \> 5) -ne 1 ]; then +if [ "$(expr "$bash_version_major" \>= 5)" -ne 1 ]; then error_echo "You should use Bash 5 and higher; exiting." 1 fi