From 25ffafc9eb5f4ab1aeffe1c3a6ce155c95894269 Mon Sep 17 00:00:00 2001 From: Joel Pittet Date: Thu, 28 Sep 2017 21:38:06 +0200 Subject: [PATCH] fall back to uri on alias record for site install (#2981) --- src/Commands/core/SiteInstallCommands.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Commands/core/SiteInstallCommands.php b/src/Commands/core/SiteInstallCommands.php index 0f6c4e19fc..6714e1f61a 100644 --- a/src/Commands/core/SiteInstallCommands.php +++ b/src/Commands/core/SiteInstallCommands.php @@ -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)) {