From: Daan De Meyer Date: Wed, 20 Mar 2024 12:08:21 +0000 (+0100) Subject: Set $HOME to the user's home directory in sync scripts X-Git-Tag: v23~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce34b33f66cc50c28f702d66b93d0f0c2a3f60ad;p=thirdparty%2Fmkosi.git Set $HOME to the user's home directory in sync scripts Makes sure git can find the user's git configuration. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 98fc92947..743feefd2 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -462,6 +462,7 @@ def run_sync_scripts(context: Context) -> None: # git repository and might need to modify the git config in the parent git repository when submodules # are in use as well. mounts += [Mount(p, p)] + env["HOME"] = os.fspath(p) if (p := Path(f"/run/user/{INVOKING_USER.uid}")).exists(): mounts += [Mount(p, p, ro=True)]