Skip to content
Snippets Groups Projects
Commit 058a267d authored by Erick Hitter's avatar Erick Hitter
Browse files

When the spawned command fails, return its error rather than killing the cron runner

parent eca8ecc0
No related branches found
No related tags found
No related merge requests found
......@@ -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 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment