From d07eb6fe0a8f419bc8eed0319919d78e2313ae1f Mon Sep 17 00:00:00 2001 From: L0RD-ZER0 <68327382+L0RD-ZER0@users.noreply.github.com> Date: Fri, 14 Jun 2024 13:42:24 +0530 Subject: [PATCH] Update Cron-Command to account for site's type and existence when using cron-update. --- src/Cron_Command.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Cron_Command.php b/src/Cron_Command.php index c1b8578..96c62d3 100644 --- a/src/Cron_Command.php +++ b/src/Cron_Command.php @@ -228,6 +228,12 @@ public function update( $args, $assoc_args ) { EE::error( 'You should specify at least one of - site, command, schedule or user to update' ); } if ( $site ) { + if ( 'host' !== $site ) { + $site_info = \EE\Site\Utils\get_site_info( [ $site ] ); + if ( ! EE_DOCKER::service_exists( 'php', $site_info['site_fs_path'] ) ) { + EE::error( $site . ' does not have PHP container.' ); + } + } $data_to_update['site_url'] = $site; } if ( $user ) {