From 2c1b0ea9c71d8a7e3a076067c5b467e054ddd9ab Mon Sep 17 00:00:00 2001 From: Mark Dorison Date: Thu, 10 Jun 2021 15:04:30 -0400 Subject: [PATCH] Fix multi-site URI check. (#24) Co-authored-by: Adam Zimmermann --- src/Robo/Plugin/Commands/DevelopmentModeCommands.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Robo/Plugin/Commands/DevelopmentModeCommands.php b/src/Robo/Plugin/Commands/DevelopmentModeCommands.php index 44713ad..d0ded91 100644 --- a/src/Robo/Plugin/Commands/DevelopmentModeCommands.php +++ b/src/Robo/Plugin/Commands/DevelopmentModeCommands.php @@ -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) {