BaseTools: enhance error handling for option --binary-source
Enhance error handling for option --binary-source to report invalid
option value. --binary-destination use same rule.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
(cherry picked from commit f21547ff64
)
This commit is contained in:
@ -793,12 +793,18 @@ class Build():
|
|||||||
if not os.path.isabs(BinCacheSource):
|
if not os.path.isabs(BinCacheSource):
|
||||||
BinCacheSource = mws.join(self.WorkspaceDir, BinCacheSource)
|
BinCacheSource = mws.join(self.WorkspaceDir, BinCacheSource)
|
||||||
GlobalData.gBinCacheSource = BinCacheSource
|
GlobalData.gBinCacheSource = BinCacheSource
|
||||||
|
else:
|
||||||
|
if GlobalData.gBinCacheSource != None:
|
||||||
|
EdkLogger.error("build", OPTION_VALUE_INVALID, ExtraData="Invalid value of option --binary-source.")
|
||||||
|
|
||||||
if GlobalData.gBinCacheDest:
|
if GlobalData.gBinCacheDest:
|
||||||
BinCacheDest = os.path.normpath(GlobalData.gBinCacheDest)
|
BinCacheDest = os.path.normpath(GlobalData.gBinCacheDest)
|
||||||
if not os.path.isabs(BinCacheDest):
|
if not os.path.isabs(BinCacheDest):
|
||||||
BinCacheDest = mws.join(self.WorkspaceDir, BinCacheDest)
|
BinCacheDest = mws.join(self.WorkspaceDir, BinCacheDest)
|
||||||
GlobalData.gBinCacheDest = BinCacheDest
|
GlobalData.gBinCacheDest = BinCacheDest
|
||||||
|
else:
|
||||||
|
if GlobalData.gBinCacheDest != None:
|
||||||
|
EdkLogger.error("build", OPTION_VALUE_INVALID, ExtraData="Invalid value of option --binary-destination.")
|
||||||
|
|
||||||
if self.ConfDirectory:
|
if self.ConfDirectory:
|
||||||
# Get alternate Conf location, if it is absolute, then just use the absolute directory name
|
# Get alternate Conf location, if it is absolute, then just use the absolute directory name
|
||||||
|
Reference in New Issue
Block a user