From 43b1fe75b8852f29ba78c56d9d8a32db53ba83df Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 27 Oct 2020 18:31:27 +0000 Subject: [PATCH] Build/Test Tools: Specify a type when using `wp config set`. This prevents an error if constants are not predefined when running the Docker install script while using older combinations of WordPress/PHP/WP-CLI. See #48301. git-svn-id: https://develop.svn.wordpress.org/trunk@49335 602fd350-edb4-49c9-b593-d223f7449a82 --- tools/local-env/scripts/install.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/local-env/scripts/install.js b/tools/local-env/scripts/install.js index 61a4eebce8..a0a7914ca6 100644 --- a/tools/local-env/scripts/install.js +++ b/tools/local-env/scripts/install.js @@ -10,11 +10,11 @@ wp_cli( 'config create --dbname=wordpress_develop --dbuser=root --dbpass=passwor // Add the debug settings to wp-config.php. // Windows requires this to be done as an additional step, rather than using the --extra-php option in the previous step. -wp_cli( `config set WP_DEBUG ${process.env.LOCAL_WP_DEBUG} --raw` ); -wp_cli( `config set WP_DEBUG_LOG ${process.env.LOCAL_WP_DEBUG_LOG} --raw` ); -wp_cli( `config set WP_DEBUG_DISPLAY ${process.env.LOCAL_WP_DEBUG_DISPLAY} --raw` ); -wp_cli( `config set SCRIPT_DEBUG ${process.env.LOCAL_SCRIPT_DEBUG} --raw` ); -wp_cli( `config set WP_ENVIRONMENT_TYPE ${process.env.LOCAL_WP_ENVIRONMENT_TYPE}` ); +wp_cli( `config set WP_DEBUG ${process.env.LOCAL_WP_DEBUG} --raw --type=constant` ); +wp_cli( `config set WP_DEBUG_LOG ${process.env.LOCAL_WP_DEBUG_LOG} --raw --type=constant` ); +wp_cli( `config set WP_DEBUG_DISPLAY ${process.env.LOCAL_WP_DEBUG_DISPLAY} --raw --type=constant` ); +wp_cli( `config set SCRIPT_DEBUG ${process.env.LOCAL_SCRIPT_DEBUG} --raw --type=constant` ); +wp_cli( `config set WP_ENVIRONMENT_TYPE ${process.env.LOCAL_WP_ENVIRONMENT_TYPE} --type=constant` ); // Move wp-config.php to the base directory, so it doesn't get mixed up in the src or build directories. renameSync( 'src/wp-config.php', 'wp-config.php' );