From: Daan De Meyer Date: Tue, 25 Apr 2023 12:57:00 +0000 (+0200) Subject: Make sure path to parse_config() is correct after chdir() X-Git-Tag: v15~196^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae462ba1049e73df4d4512007bddbd85f389ffc7;p=thirdparty%2Fmkosi.git Make sure path to parse_config() is correct after chdir() --- diff --git a/mkosi/config.py b/mkosi/config.py index 5a8ce8def..a49c8de0a 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -1100,7 +1100,7 @@ class MkosiConfigParser: for p in sorted(path.parent.joinpath("mkosi.conf.d").iterdir()): if p.is_dir() or p.suffix == ".conf": with chdir(p if p.is_dir() else Path.cwd()): - self.parse_config(p, namespace) + self.parse_config(p if p.is_file() else Path("."), namespace) for s in self.SETTINGS: for f in s.paths: