help.c: use SHELL_PATH instead of hard-coded "/bin/sh"
authorKyle J. McKay <mackyle@gmail.com>
Sun, 8 Mar 2015 05:08:00 +0000 (21:08 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Mar 2015 22:11:29 +0000 (15:11 -0700)
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 <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/help.c
index e78c135e010afa3f9447992ae85a7cc404d0192b..7082c23b7a86c2ee440b8b9a31844ba2b0136ba0 100644 (file)
@@ -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));
 }