Skip to content

Commit 040008e

Browse files
committed
Do not check the env-provided socket for validity
1 parent 025fd47 commit 040008e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

features/config-create.feature

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,12 @@ Feature: Create a wp-config file
168168
"""
169169
<?php
170170
// The WP_CLI_TEST_DBSOCKET variable can be set in the environment to
171-
// override the default locations.
172-
$environment_socket = getenv( 'WP_CLI_TEST_DBSOCKET' );
171+
// override the default locations and will take precedence.
172+
if ( ! empty( getenv( 'WP_CLI_TEST_DBSOCKET' ) ) ) {
173+
echo getenv( 'WP_CLI_TEST_DBSOCKET' );
174+
exit(0);
175+
}
173176
$locations = [
174-
$environment_socket,
175177
'/var/run/mysqld/mysqld.sock',
176178
'/tmp/mysql.sock',
177179
];

0 commit comments

Comments
 (0)