This patch reflects Dean Wette's suggestion for a fix of bug 5980.
-- Weiqi Gao [EMAIL PROTECTED] |
Index: Execute.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
retrieving revision 1.29
diff -u -r1.29 Execute.java
--- Execute.java 10 Jan 2002 13:59:31 -0000 1.29
+++ Execute.java 24 Jan 2002 03:36:12 -0000
@@ -135,12 +135,14 @@
baseLauncher = new CommandLauncher();
}
- // Determine if we're running under 2000/NT or 98/95
+ // Determine if we're running under XP/2000/NT or 98/95
String osname =
System.getProperty("os.name").toLowerCase(Locale.US);
- if ( osname.indexOf("nt") >= 0 || osname.indexOf("2000") >= 0 ) {
- // Windows 2000/NT
+ if ( osname.indexOf("nt") >= 0 ||
+ osname.indexOf("2000") >= 0 ||
+ osname.indexOf("xp") >= 0 ) {
+ // Windows XP/2000/NT
shellLauncher = new WinNTCommandLauncher(baseLauncher);
}
else {
@@ -231,9 +233,11 @@
else if ( Os.isFamily("windows") ) {
String osname =
System.getProperty("os.name").toLowerCase(Locale.US);
- // Determine if we're running under 2000/NT or 98/95
- if ( osname.indexOf("nt") >= 0 || osname.indexOf("2000") >= 0 ) {
- // Windows 2000/NT
+ // Determine if we're running under XP/2000/NT or 98/95
+ if ( osname.indexOf("nt") >= 0 ||
+ osname.indexOf("2000") >= 0 ||
+ osname.indexOf("xp") >= 0 ) {
+ // Windows XP/2000/NT
String[] cmd = {"cmd", "/c", "set" };
return cmd;
}
2002-01-23 Dean Wette <[EMAIL PROTECTED]>
* Added Windows XP check. This fixes bug 5980. (Based on Dean's
suggestion in bugzilla follow-up message.)
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
