Reviewed-by: Liming Gao <liming....@intel.com>

>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
>Yonghong Zhu
>Sent: Thursday, January 18, 2018 1:25 PM
>To: edk2-devel@lists.01.org
>Subject: [edk2] [Patch] 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....@intel.com>
>---
> BaseTools/Source/Python/build/build.py | 6 ++++++
> 1 file changed, 6 insertions(+)
>
>diff --git a/BaseTools/Source/Python/build/build.py
>b/BaseTools/Source/Python/build/build.py
>index de19756..e4adee2 100644
>--- a/BaseTools/Source/Python/build/build.py
>+++ b/BaseTools/Source/Python/build/build.py
>@@ -792,16 +792,22 @@ class Build():
>         if GlobalData.gBinCacheSource:
>             BinCacheSource = os.path.normpath(GlobalData.gBinCacheSource)
>             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
>             ConfDirectoryPath = os.path.normpath(self.ConfDirectory)
>
>--
>2.6.1.windows.1
>
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to