diff options
author | Zhu, Yonghong <yonghong.zhu@intel.com> | 2016-05-18 09:59:20 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2016-05-23 17:05:48 +0800 |
commit | f6190a01c13a6b4dd01a1765b28964db7dc58e35 (patch) | |
tree | 0de7730a580a7b1b192dcdd8de98fb91e8c9f924 /BaseTools | |
parent | 28c1711d4ffc82166e47fc9088c50d9a984acdfc (diff) | |
download | edk2-f6190a01c13a6b4dd01a1765b28964db7dc58e35.tar.gz edk2-f6190a01c13a6b4dd01a1765b28964db7dc58e35.tar.bz2 edk2-f6190a01c13a6b4dd01a1765b28964db7dc58e35.zip |
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>
Diffstat (limited to 'BaseTools')
-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
|