Skip to content

Commit

Permalink
Add 'drush' directory in selected Drupal root and selected Composer r…
Browse files Browse the repository at this point in the history
…oot to the alias manager's search path.
  • Loading branch information
greg-1-anderson committed Aug 25, 2017
1 parent 0515d65 commit 0edb522
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Preflight/Preflight.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
*/
Expand Down

0 comments on commit 0edb522

Please sign in to comment.