From 37e5ebb23df69cdc06376acd28ceee8f12ce0647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=C3=A9na=20Proxima?= Date: Sat, 16 Oct 2021 23:01:56 -0400 Subject: [PATCH] Make the uninstaller automatically uninstall lightning_install. --- src/Commands/Uninstaller.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Commands/Uninstaller.php b/src/Commands/Uninstaller.php index 04709fc2..bb63141b 100644 --- a/src/Commands/Uninstaller.php +++ b/src/Commands/Uninstaller.php @@ -221,6 +221,11 @@ public function validate(CommandData $data) : void { public function preCommand() : void { if ($this->getUninstall()) { if ($this->installProfile === 'lightning' || $this->installProfile === 'headless_lightning') { + // The lightning_install module was created to prevent broken builds of + // Lightning (created by drupal.org's legacy packaging system) from + // being installed. + $this->drush('pm:uninstall', ['lightning_install']); + $profile = $this->input()->getOption('profile'); $this->boldlySay("Switching to $profile profile..."); $this->drush('pm:enable', ['profile_switcher']); @@ -266,6 +271,11 @@ private function getExtensionsInProfileDirectory() : array { $profile_path = $extensions['lightning']->getPath(); unset($extensions['lightning']); + // The lightning_install module is a special module that was created to + // prevent installation of broken builds of Lightning created by the legacy + // drupal.org packaging system. This utility uninstalls it along with the + // profile. + unset($extensions['lightning_install']); $filter = function (Extension $extension) use ($profile_path) : bool { return strpos($extension->getPath(), $profile_path) !== FALSE;