From 43409f3ff03ee790c4b7af49139230cb59957014 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 15 Jul 2024 11:31:18 +0200 Subject: [PATCH] fix: add validation for missing docker compose file --- bootstrap/helpers/services.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bootstrap/helpers/services.php b/bootstrap/helpers/services.php index 6390f26e8..7769b7217 100644 --- a/bootstrap/helpers/services.php +++ b/bootstrap/helpers/services.php @@ -88,6 +88,9 @@ function updateCompose(ServiceApplication|ServiceDatabase $resource) try { $name = data_get($resource, 'name'); $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); // Switch Image