Update bootstrap/helpers/parsers.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
fa8393184f
commit
334559bb0b
1 changed files with 1 additions and 2 deletions
|
|
@ -32,10 +32,9 @@ function validateDockerComposeForInjection(string $composeYaml): void
|
|||
throw new \Exception('Invalid YAML format: '.$e->getMessage());
|
||||
}
|
||||
|
||||
if (! isset($parsed['services']) || ! is_array($parsed['services'])) {
|
||||
if (! is_array($parsed) || ! isset($parsed['services']) || ! is_array($parsed['services'])) {
|
||||
throw new \Exception('Docker Compose file must contain a "services" section');
|
||||
}
|
||||
|
||||
// Validate service names
|
||||
foreach ($parsed['services'] as $serviceName => $serviceConfig) {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue