Skip to content

Commit

Permalink
fall back to uri on alias record for site install (#2981)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelpittet authored and greg-1-anderson committed Sep 28, 2017
1 parent 7457172 commit 25ffafc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Commands/core/SiteInstallCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,13 @@ public function pre(CommandData $commandData)

$aliasRecord = $this->siteAliasManager()->getSelf();


// @todo The function below is inscrutable. Would rather not port it. Please pass --sites-subdir for now.
// $sites_subdir = drush_sitealias_local_site_path($aliasRecord->legacyRecord());
$dir = $commandData->input()->getOption('sites-subdir');
if (!$dir) {
$dir = $aliasRecord->get('uri');
}

// Override with sites-subdir if specified.
if ($dir = $commandData->input()->getOption('sites-subdir')) {
if ($dir) {
$sites_subdir = "sites/$dir";
}
if (empty($sites_subdir)) {
Expand Down

0 comments on commit 25ffafc

Please sign in to comment.