diff --git a/features/plugin-activate.feature b/features/plugin-activate.feature index c4b9479a..e0dd9d7c 100644 --- a/features/plugin-activate.feature +++ b/features/plugin-activate.feature @@ -117,7 +117,7 @@ Feature: Activate WordPress plugins */ """ And I run `wp plugin deactivate --all` - And I run `php -r 'echo PHP_VERSION;'` + And I run `wp cli info | grep "PHP version" | awk '{print $3}'` And save STDOUT as {PHP_VERSION} When I try `wp plugin activate high-requirements` @@ -129,6 +129,10 @@ Feature: Activate WordPress plugins """ 1 out of 1 """ + And STDOUT should not contain: + """ + Success: + """ Scenario: Adding --exclude with plugin activate --all should exclude the plugins specified via --exclude When I try `wp plugin activate --all --exclude=hello` diff --git a/src/Plugin_Command.php b/src/Plugin_Command.php index 336f1dda..91c7e67c 100644 --- a/src/Plugin_Command.php +++ b/src/Plugin_Command.php @@ -368,6 +368,7 @@ public function activate( $args, $assoc_args = array() ) { $message = wp_strip_all_tags( $message ); $message = str_replace( 'Error: ', '', $message ); WP_CLI::warning( "Failed to activate plugin. {$message}" ); + ++$errors; } else { $this->active_output( $plugin->name, $plugin->file, $network_wide, 'activate' ); ++$successes;