Skip to content

Commit d7a40b7

Browse files
More robust check for Bedrock environments
1 parent 50a437e commit d7a40b7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cli/Valet/Drivers/Specific/BedrockValetDriver.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ class BedrockValetDriver extends BasicValetDriver
1111
*/
1212
public function serves(string $sitePath, string $siteName, string $uri): bool
1313
{
14-
return file_exists($sitePath.'/web/app/mu-plugins/bedrock-autoloader.php') ||
15-
(is_dir($sitePath.'/web/app/') &&
16-
file_exists($sitePath.'/web/wp-config.php') &&
17-
file_exists($sitePath.'/config/application.php'));
14+
return $this->composerRequires('roots/bedrock-autoloader') ||
15+
file_exists($sitePath.'/web/app/mu-plugins/bedrock-autoloader.php') ||
16+
(is_dir($sitePath.'/web/app/') &&
17+
file_exists($sitePath.'/web/wp-config.php') &&
18+
file_exists($sitePath.'/config/application.php'));
1819
}
1920

2021
/**

0 commit comments

Comments
 (0)