Changeset 63422
- Timestamp:
- 09/01/2026 05:50:10 PM (11 hours ago)
- Location:
- branches/7.0
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
tools/local-env/scripts/docker.js (modified) (1 diff)
-
tools/local-env/scripts/start.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/7.0
- Property svn:mergeinfo changed
/trunk merged: 62871,63416
- Property svn:mergeinfo changed
-
branches/7.0/tools/local-env/scripts/docker.js
r61196 r63422 39 39 ); 40 40 41 process.exit( returns.status ); 41 if ( returns.error ) { 42 console.error( `Could not run Docker Compose. ${ returns.error.message }` ); 43 } else if ( returns.signal && returns.signal !== 'SIGINT' ) { 44 console.error( `Docker Compose was terminated by ${ returns.signal }.` ); 45 } 46 47 // `status` is null when Docker could not be spawned at all, or was killed by a signal. SIGINT is 48 // how a long-running command such as `env:logs` is normally ended, so it is not a failure worth an 49 // npm error block. Every other signal means the command was killed before it finished. 50 process.exit( returns.signal === 'SIGINT' ? 0 : ( returns.status ?? 1 ) ); -
branches/7.0/tools/local-env/scripts/start.js
r61459 r63422 5 5 const { execSync, spawnSync } = require( 'child_process' ); 6 6 const local_env_utils = require( './utils' ); 7 const { co nstants, copyFile} = require( 'node:fs' );7 const { copyFileSync, existsSync } = require( 'node:fs' ); 8 8 9 9 // Copy the default .env file when one is not present. 10 copyFile( '.env.example', '.env', constants.COPYFILE_EXCL, () =>{11 co nsole.log( '.env file already exists. .env.example was not copied.' );12 } );10 if ( ! existsSync( '.env' ) ) { 11 copyFileSync( '.env.example', '.env' ); 12 } 13 13 14 14 dotenvExpand.expand( dotenv.config() ); … … 33 33 } 34 34 35 spawnSync(35 const up = spawnSync( 36 36 'docker', 37 37 [ … … 45 45 { stdio: 'inherit' } 46 46 ); 47 48 // No signal is exempt here, unlike in `docker.js`: `env:start` runs `composer update -W` next, and 49 // that must not run against containers that never came up. 50 if ( up.status !== 0 ) { 51 const reason = up.signal ? `It was terminated by ${ up.signal }.` : up.error?.message ?? ''; 52 53 console.error( `Could not start the Docker containers. ${ reason }`.trim() ); 54 55 // `status` is null when Docker could not be spawned at all, or was killed by a signal. 56 process.exit( up.status ?? 1 ); 57 } 47 58 48 59 // If Docker Toolbox is being used, we need to manually forward LOCAL_PORT to the Docker VM.
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)