Changeset 59249
- Timestamp:
- 10/18/2024 12:35:37 PM (7 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 18 18 # Files for local environment config 19 19 /docker-compose.override.yml 20 .env
-
- Property svn:ignore
-
trunk/tools/local-env/scripts/start.js
r59038 r59249 2 2 const dotenvExpand = require( 'dotenv-expand' ); 3 3 const { execSync } = require( 'child_process' ); 4 const { constants, copyFile } = require( 'node:fs' ); 4 5 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 6 // Copy the default .env file when one is not present. 7 copyFile( '.env.example', '.env', constants.COPYFILE_EXCL, (e) => { 8 console.log( '.env file already exists. .env.example was not copied.' ); 9 }); 18 10 19 11 dotenvExpand.expand( dotenv.config() );
Note: See TracChangeset
for help on using the changeset viewer.