Build/Test Tools: Properly escape $ characters in Docker compose file.

This fixes an invalid interpolation format error that can be encountered in the `mysql` container’s healthcheck test command.

Follow up to [59484].

Props afercia.
See #62221.

git-svn-id: https://develop.svn.wordpress.org/trunk@59489 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2024-12-05 15:35:17 +00:00
parent b67c76ebc6
commit e585c95467

View File

@ -82,7 +82,7 @@ services:
command: ${LOCAL_DB_AUTH_OPTION-} command: ${LOCAL_DB_AUTH_OPTION-}
healthcheck: healthcheck:
test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ]; then case \"$LOCAL_DB_VERSION\" in 5.5|10.0|10.1|10.2|10.3) mysqladmin ping -h localhost || exit $?;; *) mariadb-admin ping -h localhost || exit $?;; esac; else mysqladmin ping -h localhost || exit $?; fi" ] test: [ "CMD-SHELL", "if [ \"$LOCAL_DB_TYPE\" = \"mariadb\" ]; then case \"$LOCAL_DB_VERSION\" in 5.5|10.0|10.1|10.2|10.3) mysqladmin ping -h localhost || exit $$?;; *) mariadb-admin ping -h localhost || exit $$?;; esac; else mysqladmin ping -h localhost || exit $$?; fi" ]
timeout: 5s timeout: 5s
interval: 5s interval: 5s
retries: 10 retries: 10