Skip to content

Commit

Permalink
Fix --skip-confirm in pairing with --network-wide since previousl…
Browse files Browse the repository at this point in the history
…y, it wasn't passed in at all
  • Loading branch information
rebeccahum committed Dec 20, 2023
1 parent 16d3f98 commit b4793a8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions search/includes/classes/commands/class-corecommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ public function index( $args, $assoc_args ) {

$using_versions = $assoc_args['using-versions'] ?? false;
$skip_confirm = isset( $assoc_args['skip-confirm'] ) && $assoc_args['skip-confirm'];
if ( $skip_confirm ) {
// ElasticPress uses --yes, not --skip-confirm
$assoc_args['yes'] = true;
unset( $assoc_args['skip-confirm'] );
}

$this->maybe_setup_index_version( $assoc_args );

Expand All @@ -241,7 +246,7 @@ public function index( $args, $assoc_args ) {
* EP's `--network-wide` mode uses switch_to_blog to index the content,
* that may not be reliable if the codebase differs between subsites.
*
* Side-step the issue by spawning child proccesses for each subsite.
* Side-step the issue by spawning child processes for each subsite.
*/
if ( is_multisite() && ( $network_mode || $batch_mode ) ) {
if ( $network_mode ) {
Expand Down Expand Up @@ -300,10 +305,6 @@ public function index( $args, $assoc_args ) {
// an error for indexing operations exclusively for some reason.
unset( $assoc_args['version'] );
unset( $assoc_args['using-versions'] );
unset( $assoc_args['skip-confirm'] );
if ( $skip_confirm ) {
$assoc_args['yes'] = true;
}

\Automattic\VIP\Logstash\log2logstash(
[
Expand Down

0 comments on commit b4793a8

Please sign in to comment.