@@ -2,7 +2,7 @@ const dotenv = require( 'dotenv' );
22const dotenvExpand = require ( 'dotenv-expand' ) ;
33const wait_on = require ( 'wait-on' ) ;
44const { execSync } = require ( 'child_process' ) ;
5- const { renameSync , readFileSync, writeFileSync } = require ( 'fs' ) ;
5+ const { readFileSync, writeFileSync } = require ( 'fs' ) ;
66const local_env_utils = require ( './utils' ) ;
77
88dotenvExpand . expand ( dotenv . config ( ) ) ;
@@ -11,7 +11,7 @@ dotenvExpand.expand( dotenv.config() );
1111local_env_utils . determine_auth_option ( ) ;
1212
1313// Create wp-config.php.
14- wp_cli ( ' config create --dbname=wordpress_develop --dbuser=root --dbpass=password --dbhost=mysql --force' ) ;
14+ wp_cli ( ` config create --dbname=wordpress_develop --dbuser=root --dbpass=password --dbhost=mysql --force --config-file= ${ process . env . LOCAL_DIR } /../wp-config.php` ) ;
1515
1616// Add the debug settings to wp-config.php.
1717// Windows requires this to be done as an additional step, rather than using the --extra-php option in the previous step.
@@ -22,9 +22,6 @@ wp_cli( `config set SCRIPT_DEBUG ${process.env.LOCAL_SCRIPT_DEBUG} --raw --type=
2222wp_cli ( `config set WP_ENVIRONMENT_TYPE ${ process . env . LOCAL_WP_ENVIRONMENT_TYPE } --type=constant` ) ;
2323wp_cli ( `config set WP_DEVELOPMENT_MODE ${ process . env . LOCAL_WP_DEVELOPMENT_MODE } --type=constant` ) ;
2424
25- // Move wp-config.php to the base directory, so it doesn't get mixed up in the src or build directories.
26- renameSync ( `${ process . env . LOCAL_DIR } /wp-config.php` , 'wp-config.php' ) ;
27-
2825// Read in wp-tests-config-sample.php, edit it to work with our config, then write it to wp-tests-config.php.
2926const testConfig = readFileSync ( 'wp-tests-config-sample.php' , 'utf8' )
3027 . replace ( 'youremptytestdbnamehere' , 'wordpress_develop_tests' )
0 commit comments