We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 09d9c3d + ebf4069 commit 101b76aCopy full SHA for 101b76a
src/Console/SailEnvCommand.php
@@ -59,7 +59,7 @@ protected function getServicesFromDockerCompose(): array
59
$dockerComposeContent = file_get_contents($this->laravel->basePath('docker-compose.yml'));
60
61
$regex = '/'.implode('|', array_map(function ($service) {
62
- return '(?<=\s)'.$service.'(?=:)'; // Match service name followed by ':' (e.g. mysql:) and preceded by whitespace
+ return '(?<=[^\S]\s)'.$service.'(?=:)'; // Match service name followed by ':' (e.g. mysql:) and preceded only by whitespace
63
}, $this->services)).'/';
64
65
preg_match_all($regex, $dockerComposeContent, $matches);
0 commit comments