Do not replace SHELL when using /bin/sh. From someone in GitHub issue 4528.

This commit is contained in:
nicm
2025-06-15 21:57:58 +00:00
parent 77ca59acac
commit d7f75ac985

3
job.c
View File

@ -176,7 +176,8 @@ job_run(const char *cmd, int argc, char **argv, struct environ *e,
closefrom(STDERR_FILENO + 1);
if (cmd != NULL) {
setenv("SHELL", shell, 1);
if (flags & JOB_DEFAULTSHELL)
setenv("SHELL", shell, 1);
execl(shell, argv0, "-c", cmd, (char *)NULL);
fatal("execl failed");
} else {