Skip to content

Commit cef541f

Browse files
committed
Try alternative way for vsdev cmd
1 parent 28782e8 commit cef541f

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/windows.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,23 @@ jobs:
115115
InstallPhpDevPack
116116
117117
- name: Install MSVC Compiler Tool
118-
uses: ilammy/msvc-dev-cmd@v1
119-
with:
120-
arch: ${{ matrix.arch }}
121-
toolset: ${{ matrix.vc_num }}
118+
# uses: ilammy/msvc-dev-cmd@v1
119+
# with:
120+
# arch: ${{ matrix.arch }}
121+
# toolset: ${{ matrix.vc_num }}
122+
shell: cmd
123+
run: |
124+
SET VSWHERE="C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere"
125+
SET VSCMD_SKIP_SENDTELEMETRY=No way
126+
127+
for /f "usebackq tokens=*" %%i in (`%VSWHERE% -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
128+
set InstallDir=%%i
129+
)
130+
131+
if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
132+
echo "Found %InstallDir%\Common7\Tools\vsdevcmd.bat"
133+
call "%InstallDir%\Common7\Tools\vsdevcmd.bat" %*
134+
) else "VC not found"
122135
123136
- name: Set PHP SDK Environment variables
124137
shell: cmd

0 commit comments

Comments
 (0)