Skip to content

Commit 4b4e950

Browse files
committed
Build/Test Tools: Ensure all db WP-CLI commands work.
This ensures that the presence of a self-signed certificate from a MySQL/MariaDB container will not cause `db` WP-CLI commands run using `env:cli` in the local development environments to fail. Follow up to [60735]. Props westonruter, mukesh27. Fixes #64128. See #63876. git-svn-id: https://develop.svn.wordpress.org/trunk@61196 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c09b7fb commit 4b4e950

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/local-env/scripts/docker.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ if ( [ 'exec', 'run' ].includes( dockerCommand[0] ) && ! process.stdin.isTTY ) {
2020
dockerCommand.splice( 1, 0, '--no-TTY' );
2121
}
2222

23+
// Add a --defaults flag to any db command WP-CLI command. See https://core.trac.wordpress.org/ticket/63876.
24+
if ( dockerCommand.includes( 'cli' ) && dockerCommand.includes( 'db' ) && ! dockerCommand.includes( '--defaults' ) ) {
25+
dockerCommand.push( '--defaults' );
26+
}
27+
2328
// Execute any Docker compose command passed to this script.
2429
const returns = spawnSync(
2530
'docker',

0 commit comments

Comments
 (0)