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:
Chirag AggarwalandCursor committed 2026-07-10 17:28:49 +05:30
1 parent d0d1ab0338
commit a75d95a9b5
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];
}
}
}