Skip to content

Commit 4cf3e4b

Browse files
committed
Merge branch 'mrrobot47-fix/checks' into develop-v4
2 parents 7bff0c1 + b432c71 commit 4cf3e4b

File tree

2 files changed

+26
-17
lines changed

2 files changed

+26
-17
lines changed

php/EE/Migration/GlobalContainers.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static function revert_global_containers( $source_path, $dest_path, $upda
4141

4242
$services_to_regenerate = '';
4343
$all_global_images = self::get_all_global_images_with_service_name();
44-
foreach ( $updated_global_images as $image_name ) {
44+
foreach ( $updated_images as $image_name ) {
4545
$global_container_name = $all_global_images[ $image_name ];
4646
$services_to_regenerate .= str_replace( '-', '_', ltrim( $global_container_name, 'ee-' ) ) . ' ';
4747
}

php/EE/Runner.php

+25-16
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,6 @@ public function __get( $key ) {
5151
*/
5252
private function init_ee() {
5353

54-
// Minimum requirement checks.
55-
$docker_running = 'docker ps > /dev/null';
56-
if ( ! EE::exec( $docker_running ) ) {
57-
EE::error( 'docker not installed or not running.' );
58-
}
59-
60-
$docker_compose_installed = 'command -v docker-compose > /dev/null';
61-
if ( ! EE::exec( $docker_compose_installed ) ) {
62-
EE::error( 'EasyEngine requires docker-compose.' );
63-
}
64-
65-
if ( version_compare( PHP_VERSION, '7.2.0' ) < 0 ) {
66-
EE::error( 'EasyEngine requires minimum PHP 7.2.0 to run.' );
67-
}
68-
6954
$this->ensure_present_in_config( 'locale', 'en_US' );
7055
$this->ensure_present_in_config( 'ee_installer_version', 'stable' );
7156

@@ -76,7 +61,31 @@ private function init_ee() {
7661
if ( ! is_dir( $db_dir ) ) {
7762
mkdir( $db_dir );
7863
}
79-
$this->maybe_trigger_migration();
64+
65+
if (
66+
! empty( $this->arguments ) &&
67+
( 'help' !== $this->arguments[0] )
68+
&& $this->arguments !== [ 'cli', 'version' ]
69+
)
70+
{
71+
72+
// Minimum requirement checks.
73+
$docker_running = 'docker ps > /dev/null';
74+
if ( ! EE::exec( $docker_running ) ) {
75+
EE::error( 'docker not installed or not running.' );
76+
}
77+
78+
$docker_compose_installed = 'command -v docker-compose > /dev/null';
79+
if ( ! EE::exec( $docker_compose_installed ) ) {
80+
EE::error( 'EasyEngine requires docker-compose.' );
81+
}
82+
83+
if ( version_compare( PHP_VERSION, '7.2.0' ) < 0 ) {
84+
EE::error( 'EasyEngine requires minimum PHP 7.2.0 to run.' );
85+
}
86+
87+
$this->maybe_trigger_migration();
88+
}
8089
}
8190

8291
/**

0 commit comments

Comments
 (0)