Add doublequotes when doublequotes exist in windows batch

This commit is contained in:
huangyuhui
2018-08-18 00:43:55 +08:00
parent 26a6a7d883
commit 43d8d96608

View File

@@ -95,7 +95,7 @@ public final class CommandBuilder {
}
private static String parseWindows(String s) {
String escape = " \t^&<>|";
String escape = " \t\"^&<>|";
if (StringUtils.containsOne(s, escape.toCharArray()))
// The argument has not been quoted, add quotes.
return '"' + s