Make WordPress Core

Changeset 63425 for branches/6.7


Ignore:
Timestamp:
09/01/2026 05:56:56 PM (5 days ago)
Author:
lancewillett
Message:

Build/Test Tools: Copy local environment configuration synchronously.

Merges [62871] to the 6.7 branch.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13350

Reviewed by: johnbillion.
Props jonsurrell, lucasbustamante, mukesh27, adrianmoldovanwp.
See #65745.

Location:
branches/6.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.7

  • branches/6.7/tools/local-env/scripts/start.js

    r59309 r63425  
    33const { execSync } = require( 'child_process' );
    44const local_env_utils = require( './utils' );
    5 const { constants, copyFile } = require( 'node:fs' );
     5const { copyFileSync, existsSync } = require( 'node:fs' );
    66
    77// Copy the default .env file when one is not present.
    8 copyFile( '.env.example', '.env', constants.COPYFILE_EXCL, (e) => {
    9         console.log( '.env file already exists. .env.example was not copied.' );
    10 });
     8if ( ! existsSync( '.env' ) ) {
     9        copyFileSync( '.env.example', '.env' );
     10}
    1111
    1212dotenvExpand.expand( dotenv.config() );
Note: See TracChangeset for help on using the changeset viewer.