From b614045d97fd99b0ddee5e08b672f3f91862cf9f Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Tue, 30 Sep 2025 18:08:49 +0400 Subject: [PATCH] fix(builds-worker): Use outputDirectory attribute from deployment or resource --- src/Appwrite/Platform/Modules/Functions/Workers/Builds.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php index ce45d6b629..9fcf64814c 100644 --- a/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php +++ b/src/Appwrite/Platform/Modules/Functions/Workers/Builds.php @@ -692,9 +692,11 @@ class Builds extends Action // Start separation, enter build folder $listFilesCommand .= 'echo "{APPWRITE_DETECTION_SEPARATOR_START}" && cd /usr/local/build'; + $outputDirectory = $deployment->getAttribute('outputDirectory') ?? $resource->getAttribute('outputDirectory'); + // Enter output directory, if set - if (!empty($resource->getAttribute('outputDirectory', ''))) { - $listFilesCommand .= ' && cd ' . \escapeshellarg($resource->getAttribute('outputDirectory', '')); + if ($outputDirectory !== null) { + $listFilesCommand .= ' && cd ' . \escapeshellarg($resource->getAttribute('outputDirectory')); } // Print files, and end separation