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)) {