Changeset 59038
- Timestamp:
- 09/17/2024 10:25:03 PM (3 weeks ago)
- Location:
- trunk
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/.gitignore
r57640 r59038 2 2 3 3 # Configuration files with possibly sensitive information 4 .env 4 5 wp-config.php 5 6 wp-tests-config.php -
trunk/tools/local-env/scripts/start.js
r57918 r59038 2 2 const dotenvExpand = require( 'dotenv-expand' ); 3 3 const { execSync } = require( 'child_process' ); 4 5 try { 6 execSync( 'test -f .env', { stdio: 'inherit' } ); 7 } catch ( e ) { 8 // test exits with a status code of 1 if the test fails. 9 // Alert the user on any other failure. 10 if ( e.status !== 1 ) { 11 throw e; 12 } 13 14 // The file does not exist, copy over the default example file. 15 execSync( 'cp .env.example .env', { stdio: 'inherit' } ); 16 } 17 4 18 5 19 dotenvExpand.expand( dotenv.config() );
Note: See TracChangeset
for help on using the changeset viewer.