Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tools/local-env/scripts/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ const dotenv = require( 'dotenv' );
const dotenvExpand = require( 'dotenv-expand' );
const { execSync, spawnSync } = require( 'child_process' );
const local_env_utils = require( './utils' );
const { constants, copyFile } = require( 'node:fs' );
const { copyFileSync, existsSync } = require( 'node:fs' );

// Copy the default .env file when one is not present.
copyFile( '.env.example', '.env', constants.COPYFILE_EXCL, () => {
console.log( '.env file already exists. .env.example was not copied.' );
});
if ( ! existsSync( '.env' ) ) {
copyFileSync( '.env.example', '.env' );
}

dotenvExpand.expand( dotenv.config() );

Expand Down
Loading