mirror of https://github.com/acidanthera/audk.git
Added code to check if "cmd" attribute is valid or not. This is to make error report more accurate.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1702 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
fd6c41f5e2
commit
63cdbe79b1
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue