diff --git a/src/Preflight/Preflight.php b/src/Preflight/Preflight.php index 602247b896..a8aadff1ad 100644 --- a/src/Preflight/Preflight.php +++ b/src/Preflight/Preflight.php @@ -159,7 +159,9 @@ protected function doRun($argv) $aliasManager = (new SiteAliasManager()) ->addSearchLocation($preflightArgs->aliasPath()) ->addSearchLocation($this->environment->systemConfigPath()) - ->addSearchLocation($this->environment->userConfigPath()); + ->addSearchLocation($this->environment->userConfigPath()) + ->addSearchLocation($this->selectedDrupalRoot() . '/drush') + ->addSearchLocation($this->selectedComposerRoot() . '/drush'); $selfAliasRecord = $aliasManager->findSelf($preflightArgs->alias(), $root, $preflightArgs->uri()); $aliasConfig = $selfAliasRecord->exportConfig(); $configLocator->addAliasConfig($aliasConfig); @@ -226,9 +228,19 @@ protected function findSelectedSite(PreflightArgs $preflightArgs) protected function setSelectedSite($selectedRoot) { $this->drupalFinder->locateRoot($selectedRoot); + return $this->selectedDrupalRoot(); + } + + protected function selectedDrupalRoot() + { return $this->drupalFinder->getDrupalRoot(); } + protected function selectedComposerRoot() + { + return $this->drupalFinder->getComposerRoot(); + } + /** * Create a command file discovery object */