Browse Source

ExecTask executes checkConfiguration() even though os does not match.

PR: 31805
Obtained from: David Boon


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276951 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
4e1ca8adac
2 changed files with 11 additions and 6 deletions
  1. +3
    -0
      WHATSNEW
  2. +8
    -6
      src/main/org/apache/tools/ant/taskdefs/ExecTask.java

+ 3
- 0
WHATSNEW View File

@@ -124,6 +124,9 @@ Fixed bugs:
* Execution of top level tasks in imported files get delayed by targets.
Bugzilla report 31487.

* ExecTask executes checkConfiguration() even though os does not match.
Bugzilla report 31805.

Changes from Ant 1.6.1 to Ant 1.6.2
===================================



+ 8
- 6
src/main/org/apache/tools/ant/taskdefs/ExecTask.java View File

@@ -455,15 +455,17 @@ public class ExecTask extends Task {
* </ul>
*/
public void execute() throws BuildException {
// Quick fail if this is not a valid OS for the command
if (!isValidOs()) {
return;
}
File savedDir = dir; // possibly altered in prepareExec
cmdl.setExecutable(resolveExecutable(executable, searchPath));
checkConfiguration();
if (isValidOs()) {
try {
runExec(prepareExec());
} finally {
dir = savedDir;
}
try {
runExec(prepareExec());
} finally {
dir = savedDir;
}
}



Loading…
Cancel
Save