mirror of
git://develop.git.wordpress.org/
synced 2025-03-21 20:40:44 +01:00
Build/Test Tools: Hide the Node.js error message when a Docker command produces a non-zero exit code.
When running a command that goes via docker.js and produces a non-zero exit code, the error message and stack trace from node an safely be hidden because the stack trace only points to the `execSync()` call and is of no use. Fixes #62814 git-svn-id: https://develop.svn.wordpress.org/trunk@59659 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e8fc0d6ae5
commit
f1dc1916a0
@ -12,5 +12,10 @@ if (process.argv.includes('--coverage-html')) {
|
||||
process.env.LOCAL_PHP_XDEBUG_MODE = 'coverage';
|
||||
}
|
||||
|
||||
// Execute any docker compose command passed to this script.
|
||||
execSync( 'docker compose ' + composeFiles + ' ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );
|
||||
// This try-catch prevents the superfluous Node.js debugging information from being shown if the command fails.
|
||||
try {
|
||||
// Execute any Docker compose command passed to this script.
|
||||
execSync( 'docker compose ' + composeFiles + ' ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );
|
||||
} catch ( error ) {
|
||||
process.exit( 1 );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user