From ae5cc3c30301aebb59e817c09762dc6ec8009621 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Tue, 26 Jul 2016 13:31:20 +0800 Subject: [PATCH] BaseTools/toolsetup.bat: Fix bug caused by 'CONF_PATH' not defined In batch script files, setting a variable in an 'if' block will only take effect after the 'if' block. This commit fixes the issue of using the variable 'CONF_PATH' right after it is being set in an 'if' block. Cc: Yonghong Zhu Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Liming Gao --- BaseTools/toolsetup.bat | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat index c1ab9bcc8d..a64938db60 100755 --- a/BaseTools/toolsetup.bat +++ b/BaseTools/toolsetup.bat @@ -162,14 +162,14 @@ if not defined WORKSPACE ( if not defined CONF_PATH ( set CONF_PATH=%WORKSPACE%\Conf +) - if NOT exist %CONF_PATH% ( - if defined PACKAGES_PATH ( - for %%i IN (%PACKAGES_PATH%) DO ( - if exist %%~fi\Conf ( - set CONF_PATH=%%i\Conf - goto CopyConf - ) +if NOT exist %CONF_PATH% ( + if defined PACKAGES_PATH ( + for %%i IN (%PACKAGES_PATH%) DO ( + if exist %%~fi\Conf ( + set CONF_PATH=%%i\Conf + goto CopyConf ) ) ) -- 2.39.2