mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
fix: realign framework buildRuntime after allowlist filtering
If the default buildRuntime is excluded by _APP_SITES_RUNTIMES, point it at the first remaining enabled runtime so clients do not preselect an invalid value. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 file changed
+6
@@ -69,6 +69,12 @@ class XList extends Base
|
||||
// Drop frameworks that have no enabled build runtimes left.
|
||||
if (empty($frameworks[$key]['runtimes'])) {
|
||||
unset($frameworks[$key]);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Keep the default buildRuntime aligned with the filtered allowlist.
|
||||
if (!\in_array($frameworks[$key]['buildRuntime'] ?? '', $frameworks[$key]['runtimes'], true)) {
|
||||
$frameworks[$key]['buildRuntime'] = $frameworks[$key]['runtimes'][0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user