diff --git a/tools/local-env/scripts/start.js b/tools/local-env/scripts/start.js
index cf18435450..f3e066126b 100644
a
|
b
|
const { execSync } = require( 'child_process' ); |
4 | 4 | |
5 | 5 | dotenvExpand( dotenv.config() ); |
6 | 6 | |
| 7 | // Check if docker server is available |
| 8 | // @ticket 51898 |
| 9 | // |
| 10 | // The docker info command will throw an error if server is not available. |
| 11 | try { |
| 12 | execSync( 'docker info' ); |
| 13 | } |
| 14 | catch ( err ) { |
| 15 | if( err.message.startsWith( "Command failed: docker info" ) ) { |
| 16 | throw new Error( `Running docker info returned an error. Is docker service and server running?` ); |
| 17 | } |
| 18 | throw err; |
| 19 | } |
| 20 | |
7 | 21 | // Start the local-env containers. |
8 | 22 | execSync( 'docker-compose up -d wordpress-develop', { stdio: 'inherit' } ); |
9 | 23 | |