Skip to content

Commit

Permalink
help.c: use SHELL_PATH instead of hard-coded "/bin/sh"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kyle J. McKay authored and Junio C Hamano committed Mar 10, 2015
1 parent 1b56cdf commit b680a86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/help.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit b680a86

Please sign in to comment.