Skip to content

Commit

Permalink
chore: shellcheck fix
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick330602 committed Dec 31, 2023
1 parent b08c0b8 commit d3e688f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wslu-header
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit d3e688f

Please sign in to comment.