From a6001b53149f0a0ee7902ed9fcc4ad239d078db6 Mon Sep 17 00:00:00 2001 From: Riddhesh Sanghvi Date: Wed, 17 Oct 2018 13:33:32 +0530 Subject: [PATCH] Update to new utility function Signed-off-by: Riddhesh Sanghvi --- src/Cron_Command.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Cron_Command.php b/src/Cron_Command.php index 5bce8bd..1fff606 100644 --- a/src/Cron_Command.php +++ b/src/Cron_Command.php @@ -95,11 +95,8 @@ public function create( $args, $assoc_args ) { $user = EE\Utils\get_flag_value( $assoc_args, 'user' ); $site_info = \EE\Site\Utils\get_site_info( $args ); - chdir( $site_info['site_fs_path'] ); - $launch = EE::launch( 'docker-compose config --services' ); - $services = explode( PHP_EOL, trim( $launch->stdout ) ); - if ( ! in_array( 'php', $services, true ) ) { - EE::error( $site . ' does not have PHP container' ); + if ( ! EE::docker()::service_exists( 'php', $site_info['site_fs_path'] ) ) { + EE::error( $site . ' does not have PHP container.' ); } if ( '@' !== substr( trim( $schedule ), 0, 1 ) ) {