@@ -2,7 +2,7 @@ const dotenv = require( 'dotenv' );
2
2
const dotenvExpand = require ( 'dotenv-expand' ) ;
3
3
const wait_on = require ( 'wait-on' ) ;
4
4
const { execSync } = require ( 'child_process' ) ;
5
- const { renameSync , readFileSync, writeFileSync } = require ( 'fs' ) ;
5
+ const { readFileSync, writeFileSync } = require ( 'fs' ) ;
6
6
const local_env_utils = require ( './utils' ) ;
7
7
8
8
dotenvExpand . expand ( dotenv . config ( ) ) ;
@@ -11,7 +11,7 @@ dotenvExpand.expand( dotenv.config() );
11
11
local_env_utils . determine_auth_option ( ) ;
12
12
13
13
// 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` ) ;
15
15
16
16
// Add the debug settings to wp-config.php.
17
17
// 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=
22
22
wp_cli ( `config set WP_ENVIRONMENT_TYPE ${ process . env . LOCAL_WP_ENVIRONMENT_TYPE } --type=constant` ) ;
23
23
wp_cli ( `config set WP_DEVELOPMENT_MODE ${ process . env . LOCAL_WP_DEVELOPMENT_MODE } --type=constant` ) ;
24
24
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
-
28
25
// Read in wp-tests-config-sample.php, edit it to work with our config, then write it to wp-tests-config.php.
29
26
const testConfig = readFileSync ( 'wp-tests-config-sample.php' , 'utf8' )
30
27
. replace ( 'youremptytestdbnamehere' , 'wordpress_develop_tests' )
0 commit comments