Make WordPress Core

Changeset 60518

Timestamp:
07/28/2025 12:52:27 PM (4 months ago)
Author:
johnbillion
Message:

Build/Test Tools: Don't run WP-CLI commands as root in the local development environment and CI environment.

Props johnbillion, westonruter.

See #63167, #63564

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package.json

    r60438 r60518  
    184184        "env:reset": "node ./tools/local-env/scripts/docker.js down --rmi all -v --remove-orphans",
    185185        "env:install": "node ./tools/local-env/scripts/install.js",
    186         "env:cli": "node ./tools/local-env/scripts/docker.js exec cli wp --allow-root",
     186        "env:cli": "node ./tools/local-env/scripts/docker.js exec --user wp_php cli wp",
    187187        "env:logs": "node ./tools/local-env/scripts/docker.js logs",
    188188        "env:pull": "node ./tools/local-env/scripts/docker.js pull",
  • trunk/tools/local-env/scripts/install.js

    r60308 r60518  
    1515// Create wp-config.php.
    1616wp_cli( `config create --dbname=wordpress_develop --dbuser=root --dbpass=password --dbhost=mysql --force --config-file="wp-config.php"` );
    17 
    18 // Since WP-CLI runs as root, the wp-config.php created above will be read-only. This needs to be writable for the sake of E2E tests.
    19 execSync( 'node ./tools/local-env/scripts/docker.js exec cli chmod 666 wp-config.php' );
    2017
    2118// Add the debug settings to wp-config.php.
Note: See TracChangeset for help on using the changeset viewer.