Skip to content

Commit cc4eba0

Browse files
committed
Win: Use @ instead of echo off in vssetup.cmd
`echo off` affects the batch files called from this file as well.
1 parent c1f9f0a commit cc4eba0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

win32/vssetup.cmd

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
@echo off
2-
setlocal ENABLEEXTENSIONS
1+
@setlocal ENABLEEXTENSIONS
2+
::- do not `echo off` that affects the called batch files
33

44
::- check for vswhere
5-
set vswhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe
6-
if not exist "%vswhere%" (
5+
@set vswhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe
6+
@if not exist "%vswhere%" (
77
echo 1>&2 vswhere.exe not found
88
exit /b 1
99
)
1010

1111
::- find the latest build tool and its setup batch file.
12-
set VSDEVCMD=
13-
for /f "delims=" %%I in ('"%vswhere%" -products * -latest -property installationPath') do (
12+
@set VSDEVCMD=
13+
@for /f "delims=" %%I in ('"%vswhere%" -products * -latest -property installationPath') do @(
1414
set VSDEVCMD=%%I\Common7\Tools\VsDevCmd.bat
1515
)
16-
if not defined VSDEVCMD (
16+
@if not defined VSDEVCMD (
1717
echo 1>&2 Visual Studio not found
1818
exit /b 1
1919
)
2020

2121
::- default to the current processor.
22-
set arch=%PROCESSOR_ARCHITECTURE%
22+
@set arch=%PROCESSOR_ARCHITECTURE%
2323
::- `vsdevcmd.bat` requires arch names to be lowercase
24-
for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do @(
24+
@for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do @(
2525
call set arch=%%arch:%%i=%%i%%
2626
)
27-
echo on && endlocal && "%VSDEVCMD%" -arch=%arch% -host_arch=%arch% %*
27+
@(endlocal && "%VSDEVCMD%" -arch=%arch% -host_arch=%arch% %*)

0 commit comments

Comments
 (0)