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.
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))],