Re: [PATCH] BaseTools: Reset ERRORLEVEL in toolsetup.bat after edk2basetools check


Bob Feng
 

Merged.

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng
Sent: Friday, June 25, 2021 9:53 AM
To: devel@edk2.groups.io; rebecca@...; Liming Gao <gaoliming@...>; Chen, Christine <yuwei.chen@...>
Subject: Re: [edk2-devel] [PATCH] BaseTools: Reset ERRORLEVEL in toolsetup.bat after edk2basetools check

Reviewed-by: Bob Feng <bob.c.feng@...>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Rebecca Cran
Sent: Sunday, June 13, 2021 11:43 AM
To: Feng, Bob C <bob.c.feng@...>; Liming Gao <gaoliming@...>; Chen, Christine <yuwei.chen@...>
Cc: Rebecca Cran <rebecca@...>; devel@edk2.groups.io
Subject: [edk2-devel] [PATCH] BaseTools: Reset ERRORLEVEL in toolsetup.bat after edk2basetools check

When using the in-source BaseTools, edksetup.bat will exit with an ERRORLEVEL of 1 because the line in toolsetup.bat "%PYTHON_COMMAND% -c "import edk2basetools" >NUL 2>NUL"
fails.

Ensure ERRORLEVEL is set to 0 when edksetup.bat or toolsetup.bat is successfully run.

Signed-off-by: Rebecca Cran <rebecca@...>
---
BaseTools/toolsetup.bat | 2 ++
1 file changed, 2 insertions(+)

diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat index a766a69f08..ca8bfdd677 100755
--- a/BaseTools/toolsetup.bat
+++ b/BaseTools/toolsetup.bat
@@ -401,6 +401,8 @@ goto end
if %ERRORLEVEL% EQU 0 ( goto use_pip_basetools ) else (+ REM reset ERRORLEVEL+ type nul>nul goto use_builtin_basetools ) --
2.32.0




-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#76442): https://edk2.groups.io/g/devel/message/76442
Mute This Topic: https://groups.io/mt/83503069/1768742
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [bob.c.feng@...] -=-=-=-=-=-=

Join devel@edk2.groups.io to automatically receive all group messages.