Skip to content

Commit 50b82c7

Browse files
committed
mingw: quote argument to 'sh' if it contains brace
Fixes #1220 Signed-off-by: Kim Gybels <[email protected]>
1 parent 7e4058d commit 50b82c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compat/mingw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,13 +1134,13 @@ static const char *quote_arg_msys2(const char *arg)
11341134

11351135
for (p = arg; *p; p++) {
11361136
int ws = isspace(*p);
1137-
if (!ws && *p != '\\' && *p != '"')
1137+
if (!ws && *p != '\\' && *p != '"' && *p != '{')
11381138
continue;
11391139
if (!buf.len)
11401140
strbuf_addch(&buf, '"');
11411141
if (p != p2)
11421142
strbuf_add(&buf, p2, p - p2);
1143-
if (!ws)
1143+
if (!ws && *p != '{')
11441144
strbuf_addch(&buf, '\\');
11451145
p2 = p;
11461146
}

0 commit comments

Comments
 (0)