Skip to content

Commit dda3119

Browse files
wysaidclaude
andcommitted
ci(windows): make VS2026 configure idempotent for build-cache hits
The VS2026 configure step used "mkdir -p" under PowerShell, where mkdir maps to New-Item, which errors when the directory already exists. On a build-cache hit the restored build/<config> directory is present, so configure failed intermittently (cache miss passed, cache hit failed). Use New-Item -ItemType Directory -Force, matching the VS2022 job. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7f30f19 commit dda3119

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/windows-build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,10 @@ jobs:
314314
315315
# Check CMake version
316316
cmake --version
317-
318-
mkdir -p "build/${{ matrix.config }}-${{ matrix.library_type }}"
317+
318+
# Use New-Item -Force (idempotent): in PowerShell "mkdir -p" maps to New-Item,
319+
# which errors when the directory already exists -- e.g. after a build-cache hit.
320+
New-Item -ItemType Directory -Force -Path "build/${{ matrix.config }}-${{ matrix.library_type }}" | Out-Null
319321
cd "build/${{ matrix.config }}-${{ matrix.library_type }}"
320322
321323
# Use the Visual Studio 18 2026 generator with its default toolset.

0 commit comments

Comments
 (0)