diff --git a/includes/run.php b/includes/run.php index 05b8ceba66d5b61b062e0e5743c32b135bcb2a02..4377f8d75079e12c42124512f0b5eee8cd231838 100644 --- a/includes/run.php +++ b/includes/run.php @@ -23,7 +23,9 @@ function run_event( $command ) { $start = microtime( true ); $output = \WP_CLI::runcommand( $command, array( - 'return' => 'all', + 'exit_error' => false, // Don't kill the cron process if the WP-CLI command fails, otherwise we can't capture the error + 'launch' => true, // Don't reuse as we're in cron context + 'return' => 'all', // We want STDERR and the exit code, in addition to STDOUT ) ); $end = microtime( true );