Add fixups for previous change

This commit is contained in:
Justine Tunney 2022-06-27 15:00:51 -07:00
parent 3c92adfd6e
commit 5297897ba1
47 changed files with 68 additions and 15 deletions

View file

@ -75,8 +75,9 @@ int sys_execve(const char *prog, char *const argv[], char *const envp[]) {
shargs = alloca((i + 4) * sizeof(char *));
if (IsApeBinary(prog) &&
(CanExecute((ape = "/usr/bin/ape")) ||
CanExecute(
(ape = Join(firstnonnull(getenv("TMPDIR"), "/tmp"), "ape", buf))))) {
CanExecute((ape = Join(firstnonnull(getenv("TMPDIR"),
firstnonnull(getenv("HOME"), ".")),
".ape", buf))))) {
shargs[0] = ape;
shargs[1] = "-";
shargs[2] = prog;