fix: add validation for missing docker compose file
This commit is contained in:
parent
a5dd4cab52
commit
43409f3ff0
@ -88,6 +88,9 @@ function updateCompose(ServiceApplication|ServiceDatabase $resource)
|
|||||||
try {
|
try {
|
||||||
$name = data_get($resource, 'name');
|
$name = data_get($resource, 'name');
|
||||||
$dockerComposeRaw = data_get($resource, 'service.docker_compose_raw');
|
$dockerComposeRaw = data_get($resource, 'service.docker_compose_raw');
|
||||||
|
if (! $dockerComposeRaw) {
|
||||||
|
throw new \Exception('No compose file found or not a valid YAML file.');
|
||||||
|
}
|
||||||
$dockerCompose = Yaml::parse($dockerComposeRaw);
|
$dockerCompose = Yaml::parse($dockerComposeRaw);
|
||||||
|
|
||||||
// Switch Image
|
// Switch Image
|
||||||
|
Loading…
Reference in New Issue
Block a user