Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.

Commit d3e688f

Browse files
committed
chore: shellcheck fix
1 parent b08c0b8 commit d3e688f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wslu-header

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fi
4040
# prevent bash -x
4141
set +x
4242

43-
bash_version_major=$(echo $BASH_VERSION | cut -d'.' -f1)
43+
bash_version_major=$(echo "$BASH_VERSION" | cut -d'.' -f1)
4444

4545
# pipeline content to pipe... if it is wslclip
4646
if [[ "$wslu_util_name" == "wslclip" ]]; then
@@ -153,7 +153,7 @@ function error_echo {
153153
}
154154

155155
# Check if the major version number is greater than 5
156-
if [ $(expr $bash_version_major \> 5) -ne 1 ]; then
156+
if [ "$(expr "$bash_version_major" \>= 5)" -ne 1 ]; then
157157
error_echo "You should use Bash 5 and higher; exiting." 1
158158
fi
159159

0 commit comments

Comments
 (0)