From: Kyle J. McKay Date: Sun, 8 Mar 2015 05:08:00 +0000 (-0800) Subject: help.c: use SHELL_PATH instead of hard-coded "/bin/sh" X-Git-Tag: v2.4.0-rc0~35^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b680a86a86f44444643b9be5bf4822feda128cd0?ds=inline;hp=--cc help.c: use SHELL_PATH instead of hard-coded "/bin/sh" If the user has set SHELL_PATH in the Makefile then we should respect that value and use it. Signed-off-by: Kyle J. McKay Signed-off-by: Junio C Hamano --- b680a86a86f44444643b9be5bf4822feda128cd0 diff --git a/builtin/help.c b/builtin/help.c index e78c135e01..7082c23b7a 100644 --- a/builtin/help.c +++ b/builtin/help.c @@ -171,7 +171,7 @@ static void exec_man_cmd(const char *cmd, const char *page) { struct strbuf shell_cmd = STRBUF_INIT; strbuf_addf(&shell_cmd, "%s %s", cmd, page); - execl("/bin/sh", "sh", "-c", shell_cmd.buf, (char *)NULL); + execl(SHELL_PATH, SHELL_PATH, "-c", shell_cmd.buf, (char *)NULL); warning(_("failed to exec '%s': %s"), cmd, strerror(errno)); }