]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Change directory to the root directory in Mkosi.default()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 8 Jan 2024 16:34:32 +0000 (17:34 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 8 Jan 2024 17:57:54 +0000 (18:57 +0100)
Let's make sure subsequent invocations of Mkosi.default() return
the same value even if we default some settings to the current
working directory.

mkosi/config.py

index d354005c50a81c9fbe1b4698486f314ecd2f17e9..7834a6073d3ac539b401dcb6212a813d88bb0ab5 100644 (file)
@@ -1243,9 +1243,8 @@ class Config:
 
         This prevents MkosiArgs being generated with defaults values implicitly.
         """
-        with tempfile.TemporaryDirectory() as tempdir:
-            with chdir(tempdir):
-                _, [config] = parse_config([])
+        with chdir("/"):
+            _, [config] = parse_config([])
 
         return config