]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix BaseTools nmake cleanall hang issue
authorfengyunhua <fengyunhua@byosoft.com.cn>
Fri, 30 Oct 2020 03:11:08 +0000 (11:11 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 6 Nov 2020 02:45:40 +0000 (02:45 +0000)
On windows system, when use command chcp displays the number of the
active console code page, if the active console code is 936, run
make cleanall in the BaseTools will hang.
Issue reproduce step:
chcp 936
edksetup.bat VS2015
cd BaseTools
nmake cleanall

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
BaseTools/Source/C/Makefiles/NmakeSubdirs.py

index 9b699ea086e800cf90c0d6933a367a677f5a8507..1f4a45004f4b8639926f3f347d3e7bd6bfa6d7ca 100644 (file)
@@ -45,7 +45,10 @@ def RunCommand(WorkDir=None, *Args, **kwargs):
 \r
     output_lock.acquire(True)\r
     print("execute command \"{0}\" in directory {1}".format(" ".join(Args), WorkDir))\r
-    print(message)\r
+    try:\r
+        print(message)\r
+    except:\r
+        pass\r
     output_lock.release()\r
 \r
     return p.returncode, stdout\r