Skip to content

Commit 582048e

Browse files
authored
Update vc.yml
1 parent 7f6cfca commit 582048e

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

.github/workflows/vc.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ jobs:
99
runs-on: windows-2019
1010
steps:
1111
- name: Check if VCToolsRedistDir exists
12-
shell: pwsh
12+
shell: cmd
1313
run: |
14-
# Call the vcvarsall.bat to set up the environment
15-
& "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
14+
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
1615
17-
# Check if the VCToolsRedistDir variable is set
18-
if (-not $env:VCToolsRedistDir) {
19-
Write-Host "Error: Environment variable VCToolsRedistDir is not set."
20-
exit 1
21-
} else {
22-
Write-Host "VCToolsRedistDir is set to: $env:VCToolsRedistDir"
23-
}
16+
:: Check if the VCToolsRedistDir variable is set
17+
if not defined VCToolsRedistDir (
18+
echo Error: Environment variable VCToolsRedistDir is not set.
19+
exit /b 1
20+
) else (
21+
echo VCToolsRedistDir is set to: %VCToolsRedistDir%
22+
)

0 commit comments

Comments
 (0)