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

Commit 37e5ebb

Browse files
committed
Make the uninstaller automatically uninstall lightning_install.
1 parent 236465b commit 37e5ebb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Commands/Uninstaller.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,11 @@ public function validate(CommandData $data) : void {
221221
public function preCommand() : void {
222222
if ($this->getUninstall()) {
223223
if ($this->installProfile === 'lightning' || $this->installProfile === 'headless_lightning') {
224+
// The lightning_install module was created to prevent broken builds of
225+
// Lightning (created by drupal.org's legacy packaging system) from
226+
// being installed.
227+
$this->drush('pm:uninstall', ['lightning_install']);
228+
224229
$profile = $this->input()->getOption('profile');
225230
$this->boldlySay("Switching to $profile profile...");
226231
$this->drush('pm:enable', ['profile_switcher']);
@@ -266,6 +271,11 @@ private function getExtensionsInProfileDirectory() : array {
266271

267272
$profile_path = $extensions['lightning']->getPath();
268273
unset($extensions['lightning']);
274+
// The lightning_install module is a special module that was created to
275+
// prevent installation of broken builds of Lightning created by the legacy
276+
// drupal.org packaging system. This utility uninstalls it along with the
277+
// profile.
278+
unset($extensions['lightning_install']);
269279

270280
$filter = function (Extension $extension) use ($profile_path) : bool {
271281
return strpos($extension->getPath(), $profile_path) !== FALSE;

0 commit comments

Comments
 (0)