From: Daan De Meyer Date: Fri, 3 Mar 2023 20:10:01 +0000 (+0100) Subject: Add fallback paths to PATH in run_workspace_command() X-Git-Tag: v15~311^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1369%2Fhead;p=thirdparty%2Fmkosi.git 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. --- 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))],