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:
@@ -117,6 +117,7 @@ install_test_suite() {
|
|||||||
# set up testing suite if it doesn't yet exist
|
# set up testing suite if it doesn't yet exist
|
||||||
if [ ! -d "$WP_TESTS_DIR" ]; then
|
if [ ! -d "$WP_TESTS_DIR" ]; then
|
||||||
mkdir -p "$WP_TESTS_DIR"
|
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
|
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
|
echo "Error: Failed to clone wordpress-develop at branch/tag $GIT_REF" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user