From 505fa9a9ef8d06c546d339bcbfaf1c441da8d4eb Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 24 Jan 2025 12:43:23 +0100 Subject: [PATCH] Only parse profiles from subimages and includes if those are dirs --- mkosi/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkosi/config.py b/mkosi/config.py index 79eca8175..c918cde58 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -4151,7 +4151,7 @@ class ParseContext: ) with chdir(path if path.is_dir() else Path.cwd()): - self.parse_config_one(path if path.is_file() else Path.cwd(), parse_profiles=True) + self.parse_config_one(path if path.is_file() else Path.cwd(), parse_profiles=p.is_dir()) def finalize_value(self, setting: ConfigSetting[T]) -> Optional[T]: # If a value was specified on the CLI, it always takes priority. If the setting is a collection of @@ -4603,7 +4603,7 @@ def parse_config( with chdir(p if p.is_dir() else Path.cwd()): if not context.parse_config_one( p if p.is_file() else Path.cwd(), - parse_profiles=True, + parse_profiles=p.is_dir(), parse_local=True, ): continue -- 2.47.2