diff options
author | Zhu, Yonghong <yonghong.zhu@intel.com> | 2016-05-18 09:59:20 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-07-13 09:33:20 +0800 |
commit | 9341b342ec2c261fa5b3d1e5c1f17c5cfa64656e (patch) | |
tree | 2799d51e33aaeea6f67afe7cf275921771a7e9f6 /BaseTools/Source/Python/build | |
parent | 3f75b25c18c90b9fd03b39f1ac95e573c4bfe4fa (diff) | |
download | edk2-platforms-9341b342ec2c261fa5b3d1e5c1f17c5cfa64656e.tar.xz |
BaseTools: Add error condition for the path in PACKAGES_PATH env
This patch adds two error conditions:
1) if one path in PACKAGES_PATH doesn't exist.
2) if the space exists in the PACKAGES_PATH.
In V2, highlight one path in PACKAGES_PATH env doesn't exist.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed by: Andrew Fish <afish@apple.com>
(cherry picked from commit f6190a01c13a6b4dd01a1765b28964db7dc58e35)
Diffstat (limited to 'BaseTools/Source/Python/build')
-rw-r--r-- | BaseTools/Source/Python/build/build.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py index 07891dafdb..4f859bf5a7 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -110,6 +110,12 @@ def CheckEnvVariable(): # set multiple workspace
PackagesPath = os.getenv("PACKAGES_PATH")
mws.setWs(WorkspaceDir, PackagesPath)
+ if mws.PACKAGES_PATH:
+ for Path in mws.PACKAGES_PATH:
+ if not os.path.exists(Path):
+ EdkLogger.error("build", FILE_NOT_FOUND, "One Path in PACKAGES_PATH doesn't exist", ExtraData="%s" % Path)
+ elif ' ' in Path:
+ EdkLogger.error("build", FORMAT_NOT_SUPPORTED, "No space is allowed in PACKAGES_PATH", ExtraData=Path)
#
# Check EFI_SOURCE (Edk build convention). EDK_SOURCE will always point to ECP
|