Skip to content

Commit 77aec5f

Browse files
committed
Fix the test for the Bash version for shellcheck
1 parent a44754f commit 77aec5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bash-preexec.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fi
4343

4444
# We only support Bash 3.1+.
4545
# Note: BASH_VERSINFO is first available in Bash-2.0.
46-
if [[ -z "${BASH_VERSINFO-}" || BASH_VERSINFO[0] -lt 3 || BASH_VERSINFO[0] -eq 3 && BASH_VERSINFO[1] -lt 1 ]]; then
46+
if [[ -z "${BASH_VERSINFO-}" ]] || ((BASH_VERSINFO[0] < 3 || BASH_VERSINFO[0] == 3 && BASH_VERSINFO[1] < 1)); then
4747
return 1
4848
fi
4949

0 commit comments

Comments
 (0)