Skip to content

Commit

Permalink
Merge branch 'js/spawn-via-shell-path-fix'
Browse files Browse the repository at this point in the history
Mops up an unfortunate fallout from bw/spawn-via-shell-path topic.

By Johannes Sixt
* js/spawn-via-shell-path-fix:
  Do not use SHELL_PATH from build system in prepare_shell_cmd on Windows
  • Loading branch information
Junio C Hamano committed Apr 20, 2012
2 parents c5da24a + 7762975 commit 8cc5223
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions run-command.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ static const char **prepare_shell_cmd(const char **argv)
die("BUG: shell command is empty");

if (strcspn(argv[0], "|&;<>()$`\\\"' \t\n*?[#~=%") != strlen(argv[0])) {
#ifndef WIN32
nargv[nargc++] = SHELL_PATH;
#else
nargv[nargc++] = "sh";
#endif
nargv[nargc++] = "-c";

if (argc < 2)
Expand Down

0 comments on commit 8cc5223

Please sign in to comment.