From: Daan De Meyer Date: Fri, 3 Mar 2023 19:22:57 +0000 (+0100) Subject: Use union operator instead of env unpacking X-Git-Tag: v15~311^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fbe43ccc1be0f18cbb00dff9e8955288bfc0108;p=thirdparty%2Fmkosi.git Use union operator instead of env unpacking Avoids issues when the same environment variable is specified more than once. --- diff --git a/mkosi/run.py b/mkosi/run.py index 70a0fa819..1e76189c5 100644 --- a/mkosi/run.py +++ b/mkosi/run.py @@ -211,8 +211,7 @@ def run( PATH=os.environ["PATH"], TERM=os.getenv("TERM", "vt220"), LANG="C.UTF-8", - **env, - ) + ) | env try: return subprocess.run(cmdline, check=check, stdout=stdout, stderr=stderr, env=env, **kwargs,