Open eckelarsson opened 5 years ago
This issue is still valid. I can reproduce this error in WP CLI 2.10 and WP 6.5.
wp plugin update --all --format=json
Output:
[{"name":"advanced-custom-fields-pro","old_version":"6.2.7","new_version":"6.2.9","status":"Error"}]Error: No plugins updated (1 failed).
I dug down a little and found that we have implemented Quiet logger for format with json
and csv
.
$logger = new Loggers\Quiet( WP_CLI::get_runner()->in_color() );
WP_CLI::set_logger( $logger );
But this https://github.com/wp-cli/wp-cli/blob/main/php/WP_CLI/Loggers/Quiet.php logger still produce output for error()
. May be we need more quieter logger or something which will completely silence the output in error()
also.
Hello,
When running
wp plugin update --all --format=json
and there is an error with updating a plugin the output is.[{"name":"advanced-custom-fields-pro","old_version":"5.3.5","new_version":"5.7.13","status":"Error"},{"name":"wordpress-seo","old_version":"10.0","new_version":"10.0.1","status":"Updated"}]Error: Only updated 1 of 2 plugins.
The error is outside of the JSON format, should not be a mixed output.
Sysinfo