Fix the test for the Bash version for shellcheck (#142)

* Fix the test for the Bash version for shellcheck

* Add parenthesis and whitespace for clarity

---------

Co-authored-by: Michael Diamond <dimo414@gmail.com>
This commit is contained in:
Koichi Murase 2023-03-12 17:57:03 -07:00 committed by GitHub
parent 7ad48e14d3
commit fb23d474b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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