Browse Source

never ignore an explicit dir attribute in <exec>

BZ 58555: https://bz.apache.org/bugzilla/show_bug.cgi?id=58555
master
Stefan Bodewig 9 years ago
parent
commit
0ca8c46cc3
4 changed files with 20 additions and 5 deletions
  1. +7
    -0
      WHATSNEW
  2. +6
    -1
      manual/Tasks/apply.html
  3. +6
    -1
      manual/Tasks/exec.html
  4. +1
    -3
      src/main/org/apache/tools/ant/taskdefs/Execute.java

+ 7
- 0
WHATSNEW View File

@@ -4,6 +4,13 @@ Changes from Ant 1.9.6 TO Ant 1.9.7
Changes that could break older environments:
-------------------------------------------

* <exec> and <apply> used to ignore the dir attribute if it was the
same as the current working directory. They now no longer do,
which changes the behavior for vmlauncher="false" which would have
used the project's basedir rather than the current working
directory in that case.
Bugzilla Report 58555

Fixed bugs:
-----------



+ 6
- 1
manual/Tasks/apply.html View File

@@ -95,7 +95,12 @@ to send input to it is via the input and inputstring attributes.</p>
<tr>
<td valign="top">dir</td>
<td valign="top">the directory in which the command should be executed.</td>
<td align="center" valign="top">No</td>
<td align="center" valign="top">No.<br/>
<strong>Note:</strong> the default used when dir has not been
specified depends on the <code>vmlauncher</code> attribute. If
<code>vmlauncher</code> is <code>true</code> the task will use
the current working directory, otherwise it uses the project's basedir.
</td>
</tr>
<tr>
<td valign="top">relative</td>


+ 6
- 1
manual/Tasks/exec.html View File

@@ -171,7 +171,12 @@ or the task will fail as follows:
<tr>
<td valign="top">dir</td>
<td valign="top">the directory in which the command should be executed.</td>
<td align="center" valign="top">No</td>
<td align="center" valign="top">No.<br/>
<strong>Note:</strong> the default used when dir has not been
specified depends on the <code>vmlauncher</code> attribute. If
<code>vmlauncher</code> is <code>true</code> the task will use
the current working directory, otherwise it uses the project's basedir.
</td>
</tr>
<tr>
<td valign="top">os</td>


+ 1
- 3
src/main/org/apache/tools/ant/taskdefs/Execute.java View File

@@ -362,9 +362,7 @@ public class Execute {
* @param wd the working directory of the process.
*/
public void setWorkingDirectory(File wd) {
workingDirectory =
(wd == null || wd.getAbsolutePath().equals(antWorkingDirectory))
? null : wd;
workingDirectory = wd;
}

/**


Loading…
Cancel
Save