ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r446960 - in /ant/core/trunk: CONTRIBUTORS contributors.xml src/main/org/apache/tools/ant/types/Commandline.java
Date Sat, 16 Sep 2006 21:45:15 GMT
Author: peterreilly
Date: Sat Sep 16 14:45:14 2006
New Revision: 446960

URL: http://svn.apache.org/viewvc?view=rev&rev=446960
Log:
bugzilla 16604: escape ; for external commands in win9x

Modified:
    ant/core/trunk/CONTRIBUTORS
    ant/core/trunk/contributors.xml
    ant/core/trunk/src/main/org/apache/tools/ant/types/Commandline.java

Modified: ant/core/trunk/CONTRIBUTORS
URL: http://svn.apache.org/viewvc/ant/core/trunk/CONTRIBUTORS?view=diff&rev=446960&r1=446959&r2=446960
==============================================================================
Binary files - no diff available.

Modified: ant/core/trunk/contributors.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/contributors.xml?view=diff&rev=446960&r1=446959&r2=446960
==============================================================================
--- ant/core/trunk/contributors.xml (original)
+++ ant/core/trunk/contributors.xml Sat Sep 16 14:45:14 2006
@@ -264,6 +264,10 @@
     <last>Sudell</last>
   </name>
   <name>
+    <first>Edwin</first>
+    <last>Woudt</last>
+  </name>
+  <name>
     <first>Eli</first>
     <last>Tucker</last>
   </name>

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/Commandline.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/Commandline.java?view=diff&rev=446960&r1=446959&r2=446960
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/Commandline.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/Commandline.java Sat Sep 16 14:45:14
2006
@@ -30,6 +30,7 @@
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.ProjectComponent;
 import org.apache.tools.ant.util.StringUtils;
+import org.apache.tools.ant.taskdefs.condition.Os;
 
 /**
  * Commandline objects help handling command lines specifying processes to
@@ -52,6 +53,8 @@
  *
  */
 public class Commandline implements Cloneable {
+    /** win9x uses a (shudder) bat file (antRun.bat) for executing commands */
+    private static boolean IS_WIN_9X = Os.isFamily("win9x");
 
     /**
      * The arguments of the command
@@ -347,7 +350,10 @@
             } else {
                 return '\'' + argument + '\'';
             }
-        } else if (argument.indexOf("\'") > -1 || argument.indexOf(" ") > -1) {
+        } else if (argument.indexOf("\'") > -1
+                   || argument.indexOf(" ") > -1
+                   // WIN9x uses a bat file for executing commands
+                   || (IS_WIN_9X && argument.indexOf(';') != -1)) {
             return '\"' + argument + '\"';
         } else {
             return argument;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message