Skip to content

Commit b680a86

Browse files
mackylegitster
authored andcommitted
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>
1 parent 1b56cdf commit b680a86

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

builtin/help.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static void exec_man_cmd(const char *cmd, const char *page)
171171
{
172172
struct strbuf shell_cmd = STRBUF_INIT;
173173
strbuf_addf(&shell_cmd, "%s %s", cmd, page);
174-
execl("/bin/sh", "sh", "-c", shell_cmd.buf, (char *)NULL);
174+
execl(SHELL_PATH, SHELL_PATH, "-c", shell_cmd.buf, (char *)NULL);
175175
warning(_("failed to exec '%s': %s"), cmd, strerror(errno));
176176
}
177177

0 commit comments

Comments
 (0)