fix: remove stale /tmp/wordpress-develop before git clone (#82)

Prevents git clone failure on re-runs when the destination directory
already exists from a previous test suite installation.

Closes #74
This commit is contained in:
2026-03-17 19:26:41 +00:00
committed by GitHub
parent e5d2994e40
commit c3738a3106

View File

@@ -117,6 +117,7 @@ install_test_suite() {
# set up testing suite if it doesn't yet exist
if [ ! -d "$WP_TESTS_DIR" ]; then
mkdir -p "$WP_TESTS_DIR"
rm -rf /tmp/wordpress-develop
if ! git clone --quiet --depth=1 --branch "$GIT_REF" https://github.com/WordPress/wordpress-develop.git /tmp/wordpress-develop; then
echo "Error: Failed to clone wordpress-develop at branch/tag $GIT_REF" >&2
exit 1