Make WordPress Core


Ignore:
Timestamp:
06/12/2025 09:00:24 PM (8 months ago)
Author:
westonruter
Message:

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](https://github.com/wp-cli/wp-cli/blob/2800ad0a66747a826ae4221b2f022f1df6779cb6/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'?

Fixes #63543.
Props westonruter, jorbin, SirLouen.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docker-compose.yml

    r59679 r60305  
    107107      PHP_FPM_GID: ${PHP_FPM_GID-1000}
    108108      HOST_PATH: ${PWD-}/${LOCAL_DIR-src}
     109      WP_CONFIG_PATH: /var/www/wp-config.php
    109110
    110111    volumes:
Note: See TracChangeset for help on using the changeset viewer.