From: Daan De Meyer Date: Mon, 8 Jan 2024 16:34:32 +0000 (+0100) Subject: Change directory to the root directory in Mkosi.default() X-Git-Tag: v20~6^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fb963d2b02a6b5b485e6031144abdc4c659af55;p=thirdparty%2Fmkosi.git Change directory to the root directory in Mkosi.default() Let's make sure subsequent invocations of Mkosi.default() return the same value even if we default some settings to the current working directory. --- diff --git a/mkosi/config.py b/mkosi/config.py index d354005c5..7834a6073 100644 --- a/mkosi/config.py +++ b/mkosi/config.py @@ -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