diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-04-20 15:51:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-20 15:51:18 -0700 |
commit | 8cc5223495332f0454aff8e382adbb434c065942 (patch) | |
tree | 869a8e8b56af835eeb74460eee8904da17196c7d /run-command.c | |
parent | c5da24a73a96a9908ae715f6430e65294115646a (diff) | |
parent | 776297548e27d18edbd582a3cda599bb619668a9 (diff) | |
download | git-8cc5223495332f0454aff8e382adbb434c065942.tar.gz |
Merge branch 'js/spawn-via-shell-path-fix'
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
Diffstat (limited to 'run-command.c')
-rw-r--r-- | run-command.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/run-command.c b/run-command.c index 5be1b4b5ba..606791dc67 100644 --- a/run-command.c +++ b/run-command.c @@ -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) |