From f6190a01c13a6b4dd01a1765b28964db7dc58e35 Mon Sep 17 00:00:00 2001 From: "Zhu, Yonghong" Date: Wed, 18 May 2016 09:59:20 +0800 Subject: 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 Reviewed-by: Liming Gao Reviewed by: Andrew Fish --- BaseTools/Source/Python/build/build.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'BaseTools') 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 -- cgit v1.2.3