You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by External Lists <ex...@ManagedObjects.com> on 2000/05/01 00:32:02 UTC

Suggestion for Ant

Suggestion for Ant:
There is an unintended difference on Windows in the <exec> task when a
directory *is* vs. *is not* specified and different from ".".  In one case,
the command goes through "cmd.exe /c" vs. being run directly.  This can
change what command syntax is legal, such as slashes, multiple commands,
setting env. vars, etc.).  In any case, the process's working directory is
not changed when the specified dir when Ant recurses into a new base
directory using the <ant> built-in task, so a recursive build will fail.  My
proposed change is to simply always change directories before running the
command:

<             if (!dir.equals(project.resolveFile(".")))
<                 command = "cmd /c cd " + dir + " && " + command;
---
>              command = "cmd /c cd " + dir + " && " + command;