You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2001/01/21 01:41:54 UTC
cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs ExecTask.java
donaldp 01/01/20 16:41:54
Modified: src/main/org/apache/tools/ant/taskdefs ExecTask.java
Log:
If directory is specified test if it's a valid one.
Submitted By: "Nico Seessle" <Ni...@epost.de>
Revision Changes Path
1.12 +6 -0 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
Index: ExecTask.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/ExecTask.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ExecTask.java 2001/01/03 14:18:29 1.11
+++ ExecTask.java 2001/01/21 00:41:54 1.12
@@ -170,6 +170,12 @@
if (cmdl.getExecutable() == null) {
throw new BuildException("no executable specified", location);
}
+ if (dir != null && !dir.exists()) {
+ throw new BuildException("The directory you specified does not exist");
+ }
+ if (dir != null && !dir.isDirectory()) {
+ throw new BuildException("The directory you specified is not a directory");
+ }
}
/**