Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/files/test-plugin-update/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eo pipefail

echo "::group::Setup database"
echo "::group::Set up database"
cat <<EOF > ~/.my.cnf
[client]
host=${MYSQL_HOST%:*}
Expand All @@ -16,7 +16,7 @@ mysql -e "drop database if exists wordpress;"
mysql -e "create database wordpress;"
echo "::endgroup::"

echo "::group::Setup WordPress"
echo "::group::Set up WordPress"
mkdir -p /var/log/php/ /var/scripts/
cd /var/www/html
sed -i 's/apachectl -D FOREGROUND/apachectl start/' /usr/local/bin/run
Expand Down
6 changes: 5 additions & 1 deletion tools/docker/bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ user="${APACHE_RUN_USER:-www-data}"
group="${APACHE_RUN_GROUP:-www-data}"

# Download WordPress
[ -f /var/www/html/xmlrpc.php ] || wp core download
# Sometimes it fails, and a retry would be nice:
# https://github.com/wp-cli/core-command/pull/258
# https://github.com/wp-cli/wp-cli/pull/6140
# For now this should work well enough
[ -f /var/www/html/xmlrpc.php ] || wp core download || sleep $(( 30 + RANDOM % 8 )) && wp core download
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. We both missed that this should have been something like

[ -f /var/www/html/xmlrpc.php ] || wp core download || { sleep $(( 30 + RANDOM % 8 )) && wp core download; }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# Configure WordPress
if [ ! -f /var/www/html/wp-config.php ]; then
Expand Down
Loading