diff --git a/inc/cli/class-migrate-command.php b/inc/cli/class-migrate-command.php index 017303b..cc86bcc 100644 --- a/inc/cli/class-migrate-command.php +++ b/inc/cli/class-migrate-command.php @@ -259,8 +259,8 @@ function ppa( $args, $assoc_args ) : void { // Usually invalid taxonomy, lets catch and report this. if ( is_wp_error( $ppa_terms ) ) { WP_CLI::error( 'There was an error fetching the PublishPress Author data, is the plugin activated?', false ); - WP_CLI::error( $ppa_terms ); - exit; + WP_CLI::error( $ppa_terms, false ); + exit( 1 ); } /** @@ -361,9 +361,9 @@ private function get_ppa_user_id( WP_Term $ppa_author, bool $create_users = fals // If this fails we want the debug data, so print out the // arguments so we can reproduce later. if ( is_wp_error( $ppa_user_id ) ) { - WP_CLI::error( 'Could not create Authorship user with these arguments:' ); - WP_CLI::error( $ppa_user_id ); - return -1; + WP_CLI::error( 'Could not create Authorship user with these arguments:', false ); + WP_CLI::error( $ppa_user_id, false ); + exit( 1 ); } return $ppa_user_id;