[script] Resolve IncludeFile objects in component config merge (#15575)
This commit is contained in:
1 parent
e1aa92b983
commit
b83edf6c17
1 file changed
+6
@@ -288,6 +288,9 @@ def merge_component_configs(
|
||||
for pkg_name, pkg_value in list(packages_value.items()):
|
||||
if pkg_name in common_bus_packages:
|
||||
continue
|
||||
# Resolve deferred !include files before checking type
|
||||
if isinstance(pkg_value, yaml_util.IncludeFile):
|
||||
pkg_value = pkg_value.load()
|
||||
if not isinstance(pkg_value, dict):
|
||||
continue
|
||||
# Component-specific package - expand its content into top level
|
||||
@@ -295,6 +298,9 @@ def merge_component_configs(
|
||||
elif isinstance(packages_value, list):
|
||||
# List format - expand all package includes
|
||||
for pkg_value in packages_value:
|
||||
# Resolve deferred !include files before checking type
|
||||
if isinstance(pkg_value, yaml_util.IncludeFile):
|
||||
pkg_value = pkg_value.load()
|
||||
if not isinstance(pkg_value, dict):
|
||||
continue
|
||||
comp_data = merge_config(comp_data, pkg_value)
|
||||
|
||||
Reference in new issue
Block a user