summaryrefslogtreecommitdiff
path: root/builtin/help.c
diff options
context:
space:
mode:
authorKyle J. McKay <mackyle@gmail.com>2015-03-08 05:08:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-03-10 22:11:29 (GMT)
commitb680a86a86f44444643b9be5bf4822feda128cd0 (patch)
tree2a34b758ad762d11b5e4b7029fb86ba5d862987d /builtin/help.c
parent1b56cdf901f6e6a73d0edadf56afb1c878c7622a (diff)
downloadgit-b680a86a86f44444643b9be5bf4822feda128cd0.zip
git-b680a86a86f44444643b9be5bf4822feda128cd0.tar.gz
git-b680a86a86f44444643b9be5bf4822feda128cd0.tar.bz2
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 <mackyle@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/help.c')
-rw-r--r--builtin/help.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/help.c b/builtin/help.c
index e78c135..7082c23 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));
}