fix: show it docker compose has syntax errors

This commit is contained in:
Andras Bacsai
2024-05-21 12:02:04 +02:00
parent bea490081b
commit 7feb788ed3
4 changed files with 17 additions and 5 deletions

View File

@@ -1232,13 +1232,13 @@ function parseDockerComposeFile(Service|Application $resource, bool $isNew = fal
try {
$yaml = Yaml::parse($resource->docker_compose_pr_raw);
} catch (\Exception $e) {
throw new \Exception($e->getMessage());
return;
}
} else {
try {
$yaml = Yaml::parse($resource->docker_compose_raw);
} catch (\Exception $e) {
throw new \Exception($e->getMessage());
return;
}
}
$server = $resource->destination->server;