]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Reset ERRORLEVEL in toolsetup.bat after edk2basetools check
authorRebecca Cran <rebecca@bsdio.com>
Sun, 13 Jun 2021 03:43:01 +0000 (11:43 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 25 Jun 2021 04:15:40 +0000 (04:15 +0000)
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@bsdio.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
BaseTools/toolsetup.bat

index 4fcff318792c04ddb54ea1e3bd1658ad5d3b793f..58fd26a4b585ab0ffce782d4974bc978cb48a767 100755 (executable)
@@ -401,6 +401,8 @@ goto end
   if %ERRORLEVEL% EQU 0 (\r
     goto use_pip_basetools\r
   ) else (\r
+    REM reset ERRORLEVEL\r
+    type nul>nul\r
     goto use_builtin_basetools\r
   )\r
 \r