diff --git a/src/Installer/Form/ModuleConfigureForm.php b/src/Installer/Form/ModuleConfigureForm.php index 1ec0bab91..9de6125ac 100644 --- a/src/Installer/Form/ModuleConfigureForm.php +++ b/src/Installer/Form/ModuleConfigureForm.php @@ -310,7 +310,9 @@ public function submitForm(array &$form, FormStateInterface $form_state): void { ]; if (InstallerKernel::installationAttempted()) { - $GLOBALS['install_state']['thunder_install_batch'] = $batch; + $buildInfo = $form_state->getBuildInfo(); + $buildInfo['args'][0]['thunder_install_batch'] = $batch; + $form_state->setBuildInfo($buildInfo); } else { batch_set($batch); diff --git a/thunder.profile b/thunder.profile index 7f93e62bf..ef5aa6654 100644 --- a/thunder.profile +++ b/thunder.profile @@ -36,6 +36,7 @@ function thunder_install_tasks(array &$install_state): array { $tasks['thunder_module_install'] = [ 'display_name' => t('Install additional modules'), 'type' => 'batch', + 'run' => empty($install_state['thunder_install_batch']) ? INSTALL_TASK_SKIP : INSTALL_TASK_RUN_IF_NOT_COMPLETED, ]; } $tasks['thunder_finish_installation'] = [