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:
parent
2c26d8df51
commit
407a7074e6
|
@ -292,9 +292,9 @@ public abstract class ScriptShellBaseClass extends Script {
|
||||||
List<String> cmd = new ArrayList<String>();
|
List<String> cmd = new ArrayList<String>();
|
||||||
|
|
||||||
if (Platform.isWindows()) {
|
if (Platform.isWindows()) {
|
||||||
// normalize file separator for windows and run with cmd so any executable in PATH will just work
|
// normalize file separator for windows and run with powershell so any executable in PATH will just work
|
||||||
cmd.add("cmd");
|
cmd.add("powershell");
|
||||||
cmd.add("/c");
|
cmd.add("-Command");
|
||||||
} else if (args.length == 1) {
|
} else if (args.length == 1) {
|
||||||
// make unix shell parse arguments
|
// make unix shell parse arguments
|
||||||
cmd.add("sh");
|
cmd.add("sh");
|
||||||
|
|
Loading…
Reference in New Issue