From 5f406e7e9fc44f94d6aece832b76a574dbe8f6a9 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Fri, 3 Mar 2023 21:10:01 +0100 Subject: [PATCH] Add fallback paths to PATH in run_workspace_command() Some distros don't configure the appropriate default PATH for their shell when executed non-interactively, so let's add some fallback entries ourselves to make sure we can always find the executables we need. --- mkosi/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkosi/run.py b/mkosi/run.py index e59477154..ca7e38713 100644 --- a/mkosi/run.py +++ b/mkosi/run.py @@ -325,7 +325,7 @@ def run_workspace_command( PATH="", ) | env | state.environment - template = "chmod 1777 /tmp /var/tmp /dev/shm && exec {} || exit $?" + template = "chmod 1777 /tmp /var/tmp /dev/shm && PATH=$PATH:/usr/bin:/usr/sbin exec {} || exit $?" try: return run([*cmdline, template.format(shlex.join(str(s) for s in cmd))], -- 2.47.2