Skip to content
This repository has been archived by the owner on Nov 16, 2021. It is now read-only.

Commit

Permalink
Make the uninstaller automatically uninstall lightning_install.
Browse files Browse the repository at this point in the history
  • Loading branch information
phenaproxima committed Oct 17, 2021
1 parent 2106113 commit 745d164
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Commands/Uninstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 745d164

Please sign in to comment.