summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/UserDefineDef.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/UserDefineDef.java b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/UserDefineDef.java
index d983880ac7..9b66ebe9e3 100644
--- a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/UserDefineDef.java
+++ b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/userdefine/UserDefineDef.java
@@ -227,6 +227,13 @@ public class UserDefineDef extends ProcessorDef {
if (isReference()) {
throw tooManyAttributes();
}
+ if (cmd == null || cmd.trim().length() == 0) {
+ throw new BuildException("cmd attribute is empty!");
+ }
+ File cmdProgram = new File(cmd);
+ if (cmdProgram.isDirectory()) {
+ throw new BuildException(cmd + " is not valid or executable!");
+ }
this.cmd = cmd;
}