summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-08-10 01:07:40 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2025-08-11 20:29:55 +0900
commitcc4eba000b18558dc65fb349dce2b92aa7d1760f (patch)
treea9f543b38d51bae46c9816896a9010a027372bb1 /win32
parentc1f9f0a7ef9cfb4c57fb90b0a04f8f0274856386 (diff)
Win: Use `@` instead of `echo off` in `vssetup.cmd`
`echo off` affects the batch files called from this file as well.
Diffstat (limited to 'win32')
-rwxr-xr-xwin32/vssetup.cmd20
1 files changed, 10 insertions, 10 deletions
diff --git a/win32/vssetup.cmd b/win32/vssetup.cmd
index be77c87b29..1ff0a7d10a 100755
--- a/win32/vssetup.cmd
+++ b/win32/vssetup.cmd
@@ -1,27 +1,27 @@
-@echo off
-setlocal ENABLEEXTENSIONS
+@setlocal ENABLEEXTENSIONS
+::- do not `echo off` that affects the called batch files
::- check for vswhere
-set vswhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe
-if not exist "%vswhere%" (
+@set vswhere=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe
+@if not exist "%vswhere%" (
echo 1>&2 vswhere.exe not found
exit /b 1
)
::- find the latest build tool and its setup batch file.
-set VSDEVCMD=
-for /f "delims=" %%I in ('"%vswhere%" -products * -latest -property installationPath') do (
+@set VSDEVCMD=
+@for /f "delims=" %%I in ('"%vswhere%" -products * -latest -property installationPath') do @(
set VSDEVCMD=%%I\Common7\Tools\VsDevCmd.bat
)
-if not defined VSDEVCMD (
+@if not defined VSDEVCMD (
echo 1>&2 Visual Studio not found
exit /b 1
)
::- default to the current processor.
-set arch=%PROCESSOR_ARCHITECTURE%
+@set arch=%PROCESSOR_ARCHITECTURE%
::- `vsdevcmd.bat` requires arch names to be lowercase
-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 @(
+@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 @(
call set arch=%%arch:%%i=%%i%%
)
-echo on && endlocal && "%VSDEVCMD%" -arch=%arch% -host_arch=%arch% %*
+@(endlocal && "%VSDEVCMD%" -arch=%arch% -host_arch=%arch% %*)