Skip to content

Commit 2276fe7

Browse files
committed
Update checks and messages for macOS
Signed-off-by: Riddhesh Sanghvi <[email protected]>
1 parent 34e7e3c commit 2276fe7

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

php/EE/Runner.php

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,28 +81,33 @@ private function init_ee() {
8181
*/
8282
public function check_requirements( $show_error = true ) {
8383

84-
$status = true;
85-
$error = [];
84+
$docker_running = true;
85+
$status = true;
86+
$error = [];
8687

87-
$docker_running = 'docker ps > /dev/null';
88-
if ( ! EE::exec( $docker_running ) ) {
89-
$status = false;
90-
$error[] = 'Docker not installed or not running.';
88+
$docker_running_cmd = 'docker ps > /dev/null';
89+
if ( ! EE::exec( $docker_running_cmd ) ) {
90+
$status = false;
91+
$docker_running = false;
92+
$error[] = 'Docker not installed or not running.';
9193
}
9294

9395
$docker_compose_installed = 'command -v docker-compose > /dev/null';
9496
if ( ! EE::exec( $docker_compose_installed ) ) {
95-
$status = false;
96-
$error[] = 'EasyEngine requires docker-compose.';
97+
$status = false;
98+
$error[] = 'EasyEngine requires docker-compose.';
9799
}
98100

99101
if ( version_compare( PHP_VERSION, '7.2.0' ) < 0 ) {
100-
$status = false;
101-
$error[] = 'EasyEngine requires minimum PHP 7.2.0 to run.';
102+
$status = false;
103+
$error[] = 'EasyEngine requires minimum PHP 7.2.0 to run.';
102104
}
103105

104106
if ( $show_error && ! $status ) {
105-
EE::error( reset( $error ) );
107+
EE::error( reset( $error ), false );
108+
if ( IS_DARWIN && ! $docker_running ) {
109+
EE::log( 'For macOS docker can be installed using: `brew cask install docker`' );
110+
}
106111
}
107112

108113
return $status;

0 commit comments

Comments
 (0)