Skip to content

Commit

Permalink
Use POSIX syntax for Bash detection (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelicWizard authored Apr 21, 2022
1 parent da64ad4 commit d308800
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bash-preexec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
# either of these after bash-preexec has been installed it will most likely break.

# Make sure this is bash that's running and return otherwise.
if [[ -z "${BASH_VERSION:-}" ]]; then
# Use POSIX syntax for this line:
if [ -z "${BASH_VERSION-}" ]; then
return 1;
fi

Expand Down

0 comments on commit d308800

Please sign in to comment.