diff --git a/src/Drupal/Commands/config/ConfigImportCommands.php b/src/Drupal/Commands/config/ConfigImportCommands.php index 3db53e35c7..cf5b7af3f4 100644 --- a/src/Drupal/Commands/config/ConfigImportCommands.php +++ b/src/Drupal/Commands/config/ConfigImportCommands.php @@ -292,6 +292,12 @@ public function doImport($storage_comparer): void $context = []; do { $config_importer->doSyncStep($step, $context); + // Manually get and process any batches that may + // have been created, e.g. via hook_install() when a + // module is enabled. + if (batch_get()) { + drush_backend_batch_process(); + } if (isset($context['message'])) { $this->logger()->notice(str_replace('Synchronizing', 'Synchronized', (string)$context['message'])); }