Only quote program arguments if they actually contain spaces
parent
005d180e0c
commit
e985cb85d4
|
@ -210,7 +210,12 @@ public class RunConfig {
|
|||
}
|
||||
|
||||
first = false;
|
||||
sb.append("\"").append(arg).append("\"");
|
||||
|
||||
if (arg.contains(" ")) {
|
||||
sb.append("\"").append(arg).append("\"");
|
||||
} else {
|
||||
sb.append(arg);
|
||||
}
|
||||
}
|
||||
|
||||
return sb.toString();
|
||||
|
|
|
@ -33,6 +33,6 @@ class RunConfigUnitTest extends Specification {
|
|||
def args = RunConfig.joinArguments(["-Dfabric.test=123", "-Dfabric.test=abc 123"])
|
||||
|
||||
then:
|
||||
args == '"-Dfabric.test=123" "-Dfabric.test=abc 123"'
|
||||
args == '-Dfabric.test=123 "-Dfabric.test=abc 123"'
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue