Skip to content

Commit 8cc5223

Browse files
committed
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
2 parents c5da24a + 7762975 commit 8cc5223

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

run-command.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ static const char **prepare_shell_cmd(const char **argv)
156156
die("BUG: shell command is empty");
157157

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

162166
if (argc < 2)

0 commit comments

Comments
 (0)