Skip to content

Commit

Permalink
Fix the test for the Bash version for shellcheck (#142)
Browse files Browse the repository at this point in the history
* Fix the test for the Bash version for shellcheck

* Add parenthesis and whitespace for clarity

---------

Co-authored-by: Michael Diamond <[email protected]>
  • Loading branch information
akinomyoga and dimo414 authored Mar 13, 2023
1 parent 7ad48e1 commit fb23d47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bash-preexec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fb23d47

Please sign in to comment.