Browse Source

Treat OS/2 like Win NT with regard to <exec>'s dir attribute.

PR: #126 (Bug #33)


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268004 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 25 years ago
parent
commit
4fbcfdedaf
1 changed files with 7 additions and 4 deletions
  1. +7
    -4
      src/main/org/apache/tools/ant/taskdefs/Execute.java

+ 7
- 4
src/main/org/apache/tools/ant/taskdefs/Execute.java View File

@@ -265,10 +265,13 @@ public class Execute {
} finally {
System.getProperties().put("user.dir", antWorkingDirectory);
}
} else if (myos.toLowerCase().indexOf("windows") >= 0 &&
(myos.toLowerCase().indexOf("nt") >= 0 ||
myos.indexOf("2000") >= 0)) {
// cmd /c cd works OK on Windows NT & friends.
} else if ((myos.toLowerCase().indexOf("windows") >= 0 &&
(myos.toLowerCase().indexOf("nt") >= 0 ||
myos.indexOf("2000") >= 0))
// cmd /c cd works OK on Windows NT & friends.
|| myos.toLowerCase().indexOf("os/2") >= 0
// as well as on OS/2
) {
String[] commandLine = new String[cmdl.length+5];
commandLine[0] = "cmd";
commandLine[1] = "/c";


Loading…
Cancel
Save