Skip to content

Commit

Permalink
double quote to prevent globbing -shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
jakedoublev committed Sep 16, 2024
1 parent a5af79a commit 5b3672f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions e2e/setup_suite.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ setup_suite(){

bats_require_minimum_version 1.7.0

if [[ $(which bats) == *"homebrew"* ]]; then
if [[ "$(which bats)" == *"homebrew"* ]]; then
BATS_LIB_PATH=$(brew --prefix)/lib
fi

# Check if BATS_LIB_PATH environment variable exists
if [ -z "${BATS_LIB_PATH}" ]; then
# Check if bats bin has homebrew in path name
if [[ $(which bats) == *"homebrew"* ]]; then
BATS_LIB_PATH=$(dirname $(which bats))/../lib
if [[ "$(which bats)" == *"homebrew"* ]]; then
BATS_LIB_PATH=$(dirname "$(which bats)")/../lib
elif [ -d "/usr/lib/bats-support" ]; then
BATS_LIB_PATH="/usr/lib"
elif [ -d "/usr/local/lib/bats-support" ]; then
Expand Down

0 comments on commit 5b3672f

Please sign in to comment.