Skip to content

Commit

Permalink
CLI: On disconnect, if the site is already disconnected, exit with a …
Browse files Browse the repository at this point in the history
…success (#13779)

* CLI: On disconnect, if the site is already disconnected, exit with a success instead of a failure

* Add a return
  • Loading branch information
kraftbj authored Oct 21, 2019
1 parent 403c0c1 commit 0bee68a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion class.jetpack-cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ public function test_connection( $args, $assoc_args ) {
*/
public function disconnect( $args, $assoc_args ) {
if ( ! Jetpack::is_active() ) {
WP_CLI::error( __( 'You cannot disconnect, without having first connected.', 'jetpack' ) );
WP_CLI::success( __( 'The site is not currently connected, so nothing to do!', 'jetpack' ) );
return;
}

$action = isset( $args[0] ) ? $args[0] : 'prompt';
Expand Down

0 comments on commit 0bee68a

Please sign in to comment.