]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
spawn: inherit parent $PATH by default
authorMalte Poll <1780588+malt3@users.noreply.github.com>
Mon, 30 Oct 2023 14:24:54 +0000 (15:24 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 2 Nov 2023 10:36:19 +0000 (11:36 +0100)
Spawn should be able to find binaries in $PATH by default.

Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
mkosi/run.py

index cc408d38cd28078c48582a42524f98864c94421b..06e93aebfd22675fd601972b2708001182efff45 100644 (file)
@@ -247,6 +247,13 @@ def spawn(
         # output.
         stdout = sys.stderr
 
+    env = {
+        "PATH": os.environ["PATH"],
+        "TERM": os.getenv("TERM", "vt220"),
+        "LANG": "C.UTF-8",
+        **env,
+    }
+
     try:
         with subprocess.Popen(
             cmdline,