Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle extension activation for WP error or extension not found #146

Merged
merged 5 commits into from Mar 30, 2019

Conversation

@abhijitrakas
Copy link
Contributor

commented Feb 25, 2019

closes #127

@schlessera
Copy link
Member

left a comment

Thanks for the PR, @abhijitrakas!

Can you think of a way to write a test for this change so that we can verify its behavior and guard against regressions?

@@ -210,7 +210,10 @@ public function install( $args, $assoc_args ) {
}
}
if ( $result ) {
// Check plugin is available or not.
$plugin = $this->fetcher->get_many( array( $slug ) );

This comment has been minimized.

Copy link
@schlessera

schlessera Mar 21, 2019

Member

This could just as well be a theme here, so better use the term extension instead:

Suggested change
$plugin = $this->fetcher->get_many( array( $slug ) );
$extension = $this->fetcher->get_many( array( $slug ) );
// Check plugin is available or not.
$plugin = $this->fetcher->get_many( array( $slug ) );
if ( ! is_wp_error( $result ) && count( $plugin ) > 0 ) {

This comment has been minimized.

Copy link
@schlessera

schlessera Mar 21, 2019

Member
Suggested change
if ( ! is_wp_error( $result ) && count( $plugin ) > 0 ) {
if ( ! is_wp_error( $result ) && count( $extension ) > 0 ) {

@abhijitrakas abhijitrakas requested a review from wp-cli/committers as a code owner Mar 30, 2019

@abhijitrakas

This comment has been minimized.

Copy link
Contributor Author

commented Mar 30, 2019

@schlessera PR Updated. Thanks.

@schlessera

This comment has been minimized.

Copy link
Member

commented Mar 30, 2019

Thanks for the PR, @abhijitrakas !

@schlessera schlessera merged commit 5a0d2ce into wp-cli:master Mar 30, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.