Make WordPress Core


Ignore:
Timestamp:
09/01/2026 05:50:10 PM (27 hours ago)
Author:
lancewillett
Message:

Build/Test Tools: Correct local environment failure handling.

Merges [62871] and [63416] to the 7.0 branch.

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

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

Location:
branches/7.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/7.0

  • branches/7.0/tools/local-env/scripts/docker.js

    r61196 r63422  
    3939);
    4040
    41 process.exit( returns.status );
     41if ( 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.
     50process.exit( returns.signal === 'SIGINT' ? 0 : ( returns.status ?? 1 ) );
Note: See TracChangeset for help on using the changeset viewer.