Skip to content

Commit d21a51c

Browse files
committed
Try again with env variable
1 parent 90929d3 commit d21a51c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
2121
& "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
2222
23-
$originalWorkingDirectory = Get-Location
24-
Set-Location ${{ github.env.GITHUB_WORKSPACE }}
23+
$repoRoot = $GITHUB_WORKSPACE
24+
Write-Host "The root of the repository is $repoRoot"
2525
26-
& .\find_clang_format.cmd
26+
& $repoRoot\find_clang_format.cmd
2727
if ($LASTEXITCODE -ne 0) {
2828
exit $LASTEXITCODE
2929
}
3030
31-
& git clang-format origin/master --binary "$env:CLANG_FORMAT" --style file -- cppwinrt/*.h cppwinrt/*.cpp fast_fwd/*.h fast_fwd/*.cpp prebuild/*.h prebuild/*.cpp scratch/*.h scratch/*.cpp strings/*.h strings/*.cpp test/*.h test/*.cpp vsix/*.h vsix/*.cpp
31+
& git clang-format origin/master --binary "$env:CLANG_FORMAT" --style file -- $repoRoot/cppwinrt/*.h $repoRoot/cppwinrt/*.cpp $repoRoot/fast_fwd/*.h $repoRoot/fast_fwd/*.cpp $repoRoot/prebuild/*.h $repoRoot/prebuild/*.cpp $repoRoot/scratch/*.h $repoRoot/scratch/*.cpp $repoRoot/strings/*.h $repoRoot/strings/*.cpp $repoRoot/test/*.h $repoRoot/test/*.cpp $repoRoot/vsix/*.h $repoRoot/vsix/*.cpp
3232
3333
if ($LASTEXITCODE -ne 0) {
3434
Write-Host ::error ERROR: This branch contains changes that have not been formatted with `'clang-format`'
@@ -46,8 +46,6 @@ jobs:
4646
exit 1
4747
}
4848
49-
Set-Location $originalWorkingDirectory
50-
5149
test-msvc-cppwinrt-build:
5250
name: '${{ matrix.compiler }}: Build (${{ matrix.arch }}, ${{ matrix.config }})'
5351
strategy:

0 commit comments

Comments
 (0)