From 7cfb14671700dbba219429c4ede4effb8d8c374c Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 7 Sep 2026 10:51:20 +0500 Subject: [PATCH] vs-cfg: remove redundant `where cl` check `START` is set to `0` for "amd64" / "x64" and `1` in all other cases, effectively just skipping `GENERATORS[0]` in case when "amd64" or "x64" is present. Which is now useless, since `GENERATORS[0]` doesn't exist anymore. --- win/vs-cfg.cmd | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/win/vs-cfg.cmd b/win/vs-cfg.cmd index ecce1a9555..96d246e8e1 100644 --- a/win/vs-cfg.cmd +++ b/win/vs-cfg.cmd @@ -91,16 +91,10 @@ echo(!GENERATOR! | findstr /c:"vs20" >nul && ( ) :GeneratorShorthandCheckDone -:: Deduce desired architecture from the location of cl.exe -:: TODO harmless "INFO: Could not find files for the given pattern(s)." spam if cl.exe not in path -:: Look for path with either "amd64" or "x64" (VS 2017 and newer) -where cl.exe | findstr "amd64 x64" >nul -set START=%ERRORLEVEL% - :: NOTE add space before VC_VER so that e.g. "12" doesn't match with "2012" IF "!GENERATOR!"=="" IF NOT "%VisualStudioVersion%"=="" ( set VC_VER=%VisualStudioVersion:.0=% - FOR /L %%i in (%START%,1,%LAST_GENERATOR_IDX%) DO ( + FOR /L %%i in (1,1,%LAST_GENERATOR_IDX%) DO ( echo(!GENERATORS[%%i]! | findstr /c:" !VC_VER!" >nul && ( set GENERATOR=!GENERATORS[%%i]! call utils\cecho.cmd black cyan "Generator not passed, but VisualStudioVersion=%VisualStudioVersion% environment variable detected:"