diff --git a/CONTRIBUTORS b/CONTRIBUTORS index ccfd94629..f11e4257c 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -63,6 +63,7 @@ Don Brown Don Ferguson Don Jeffery Drew Sudell +Edwin Woudt Eli Tucker Emmanuel Bourg Eric Olsen diff --git a/contributors.xml b/contributors.xml index f5333cbc7..14455ab18 100644 --- a/contributors.xml +++ b/contributors.xml @@ -263,6 +263,10 @@ Drew Sudell + + Edwin + Woudt + Eli Tucker diff --git a/src/main/org/apache/tools/ant/types/Commandline.java b/src/main/org/apache/tools/ant/types/Commandline.java index 9105dd211..de79b7710 100644 --- a/src/main/org/apache/tools/ant/types/Commandline.java +++ b/src/main/org/apache/tools/ant/types/Commandline.java @@ -30,6 +30,7 @@ import java.util.Iterator; 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 @@ import org.apache.tools.ant.util.StringUtils; * */ 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 @@ public class Commandline implements Cloneable { } 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;