Skip to content

Commit 398aafc

Browse files
committed
Update to early invocation
Signed-off-by: Riddhesh Sanghvi <[email protected]>
1 parent ae26969 commit 398aafc

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Shell_Command.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@ private function check_shell_available( $shell_container, $site ) {
7676

7777
$launch = EE::launch( 'docker-compose config --services' );
7878
$services = explode( PHP_EOL, trim( $launch->stdout ) );
79-
if ( ! in_array( $shell_container, $services, true ) ) {
80-
EE::debug( 'Site type: ' . $site->site_type );
81-
EE::debug( 'Site command: ' . $site->app_sub_type );
82-
EE::error( sprintf( '%s site does not have support to launch %s shell.', $site->site_url, $shell_container ) );
79+
if ( in_array( $shell_container, $services, true ) ) {
80+
return;
8381
}
82+
EE::debug( 'Site type: ' . $site->site_type );
83+
EE::debug( 'Site command: ' . $site->app_sub_type );
84+
EE::error( sprintf( '%s site does not have support to launch %s shell.', $site->site_url, $shell_container ) );
8485
}
8586
}

0 commit comments

Comments
 (0)