Build/Test Tools: Improve env:install command with better configurability and error handling.

* Force WP-CLI to use the `wp-config.php` in the directory above the `src` directory via the `WP_CONFIG_PATH` environment variable [read by WP-CLI](2800ad0a66/php/utils.php (L328-L329)) in the `wp_locate_config()` function.
* Update the `env:install` command to write out the config at the repo root instead of writing it inside of the `ABSPATH` only then to move it one directory up.
* Fix JSHint issues.
* Add error handling to when `npm run env:install` is executed without having first done `npm run env:start`, in which case the script will end with an exit code of 1 and emit:

> Error: It appears the development environment has not been started. Message: Timed out waiting for: tcp:localhost:8000
> Did you forget to do 'npm run env:start'?

Reviewed by audrasjb.
Merges [60305] to the 6.8 branch.

Fixes #63543.
Props westonruter, jorbin, SirLouen.

Built from https://develop.svn.wordpress.org/branches/6.8@60431


git-svn-id: http://core.svn.wordpress.org/branches/6.8@59767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter
2025-07-07 23:32:25 +00:00
parent 6709f8f0d2
commit 61ea808034

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8.2-alpha-60428';
$wp_version = '6.8.2-alpha-60431';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.