Skip to content

Commit

Permalink
Fix multi-site URI check. (#24)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Zimmermann <[email protected]>
  • Loading branch information
markdorison and adamzimmermann authored Jun 10, 2021
1 parent b759be7 commit 2c1b0ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Robo/Plugin/Commands/DevelopmentModeCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,10 @@ protected function landoUri($siteDir): string
);
}
// Detect multi-site configurations.
// We look for the $siteDir to be at the beginning of the appserver
// proxy URL.
$siteDomains = array_filter($landoCfg['proxy']['appserver'], fn($domain) =>
strpos($domain, $siteDir) !== false);
strpos($domain, $siteDir) === 0);
if (count($siteDomains) > 1) {
$this->say('More than one possible URI found in Lando config >>> ' . implode(' | ', $siteDomains));
} elseif (count($siteDomains) == 1) {
Expand Down

0 comments on commit 2c1b0ea

Please sign in to comment.