Run --def exec commands via powershell -Command instead of cmd /c (in order to support '...' and simple curl calls and gain a small amount of cross-platform compatibility)

This commit is contained in:
Reinhard Pointner 2017-02-05 16:04:10 +08:00
parent 2c26d8df51
commit 407a7074e6
1 changed files with 3 additions and 3 deletions

View File

@ -292,9 +292,9 @@ public abstract class ScriptShellBaseClass extends Script {
List<String> cmd = new ArrayList<String>();
if (Platform.isWindows()) {
// normalize file separator for windows and run with cmd so any executable in PATH will just work
cmd.add("cmd");
cmd.add("/c");
// normalize file separator for windows and run with powershell so any executable in PATH will just work
cmd.add("powershell");
cmd.add("-Command");
} else if (args.length == 1) {
// make unix shell parse arguments
cmd.add("sh");