fix(tests): auto-init submodules when bats binary is missing (#77)
This commit was merged in pull request #77.
This commit is contained in:
@@ -7,8 +7,12 @@ REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
BATS="$REPO_ROOT/tests/bats/bin/bats"
|
||||
|
||||
if [[ ! -x "$BATS" ]]; then
|
||||
echo "Error: bats not found at $BATS" >&2
|
||||
echo " Run: git submodule update --init --recursive" >&2
|
||||
echo "bats not found at $BATS — initializing submodules..." >&2
|
||||
git -C "$REPO_ROOT" submodule update --init --recursive
|
||||
fi
|
||||
|
||||
if [[ ! -x "$BATS" ]]; then
|
||||
echo "Error: bats still not found at $BATS after submodule init" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user