summaryrefslogtreecommitdiff
path: root/run-command.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-04-20 22:51:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-04-20 22:51:18 (GMT)
commit8cc5223495332f0454aff8e382adbb434c065942 (patch)
tree869a8e8b56af835eeb74460eee8904da17196c7d /run-command.c
parentc5da24a73a96a9908ae715f6430e65294115646a (diff)
parent776297548e27d18edbd582a3cda599bb619668a9 (diff)
downloadgit-8cc5223495332f0454aff8e382adbb434c065942.zip
git-8cc5223495332f0454aff8e382adbb434c065942.tar.gz
git-8cc5223495332f0454aff8e382adbb434c065942.tar.bz2
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 5be1b4b..606791d 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)