diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-01-18 11:13:06 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-01-19 10:52:29 +0800 |
commit | f21547ff64a58909c85ce215531345f6f8364884 (patch) | |
tree | cf365fb91f7c1a2393acf8802a2e69dc9789073e /BaseTools | |
parent | 8ab0bd2397c9d3922e0c7dbb1aa6f7e08799079f (diff) | |
download | edk2-f21547ff64a58909c85ce215531345f6f8364884.tar.gz |
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>
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 de19756d99..e4adee2beb 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -794,12 +794,18 @@ class Build(): if not os.path.isabs(BinCacheSource):
BinCacheSource = mws.join(self.WorkspaceDir, 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:
BinCacheDest = os.path.normpath(GlobalData.gBinCacheDest)
if not os.path.isabs(BinCacheDest):
BinCacheDest = mws.join(self.WorkspaceDir, 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:
# Get alternate Conf location, if it is absolute, then just use the absolute directory name
|