summaryrefslogtreecommitdiffstats
path: root/run-command.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-04-21 00:51:18 +0200
committerJunio C Hamano <gitster@pobox.com>2012-04-21 00:51:18 +0200
commit8cc5223495332f0454aff8e382adbb434c065942 (patch)
tree869a8e8b56af835eeb74460eee8904da17196c7d /run-command.c
parentMerge branch 'ct/advise-push-default' (diff)
parentDo not use SHELL_PATH from build system in prepare_shell_cmd on Windows (diff)
downloadgit-8cc5223495332f0454aff8e382adbb434c065942.tar.xz
git-8cc5223495332f0454aff8e382adbb434c065942.zip
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.c4
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)