Make WordPress Core

Changeset 59752


Ignore:
Timestamp:
02/03/2025 01:35:25 PM (5 months ago)
Author:
johnbillion
Message:

Build/Test Tools: Fix the source code path handling when installing the local development environment.

This ensures the correct code is used to run the installation depending on whether it should be running from the src or build directory.

Props swissspidy, johnbillion

See #62221

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/local-env/scripts/install.js

    r59658 r59752  
    1313
    1414// Create wp-config.php.
    15 wp_cli( 'config create --dbname=wordpress_develop --dbuser=root --dbpass=password --dbhost=mysql --path=/var/www/src --force' );
     15wp_cli( 'config create --dbname=wordpress_develop --dbuser=root --dbpass=password --dbhost=mysql --force' );
    1616
    1717// Add the debug settings to wp-config.php.
     
    2525
    2626// Move wp-config.php to the base directory, so it doesn't get mixed up in the src or build directories.
    27 renameSync( 'src/wp-config.php', 'wp-config.php' );
     27renameSync( `${process.env.LOCAL_DIR}/wp-config.php`, 'wp-config.php' );
    2828
    2929install_wp_importer();
     
    5656    const composeFiles = local_env_utils.get_compose_files();
    5757
    58     execSync( `docker compose ${composeFiles} run --quiet-pull --rm cli ${cmd}`, { stdio: 'inherit' } );
     58    execSync( `docker compose ${composeFiles} run --quiet-pull --rm cli ${cmd} --path=/var/www/${process.env.LOCAL_DIR}`, { stdio: 'inherit' } );
    5959}
    6060
Note: See TracChangeset for help on using the changeset viewer.