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 8166250 + 7b3c6ae commit 828ec04Copy full SHA for 828ec04
src/Console/SailEnvCommand.php
@@ -73,13 +73,13 @@ public function handle()
73
74
protected function servicesFromDockerCompose(): array
75
{
76
- $environment = file_get_contents($this->laravel->basePath('docker-compose.yml'));
+ $dockerComposeContent = file_get_contents($this->laravel->basePath('docker-compose.yml'));
77
78
$regex = '/'.implode('|', array_map(function ($service) {
79
return '(?<=\s)'.$service.'(?=:)'; // Match service name followed by ':' (e.g. mysql:) and preceded by whitespace
80
}, $this->services)).'/';
81
82
- preg_match_all($regex, $environment, $matches);
+ preg_match_all($regex, $dockerComposeContent, $matches);
83
84
return array_values($matches[0]);
85
}
0 commit comments