fix: use realpathSync.native on Windows to resolve 8.3 short paths

realpathSync doesn't resolve Windows 8.3 short names (RUNNER~1),
but realpathSync.native does. This fixes the 3 Windows CI test
failures that block the pipeline from triggering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson 2026-03-21 12:31:19 -06:00
parent 1e0e974792
commit 42f23630e7
2 changed files with 2 additions and 2 deletions

View file

@ -15,7 +15,7 @@ const { assertEq, assertTrue, report } = createTestContext();
* Apply `realpathSync` and lowercase on Windows to eliminate both discrepancies.
*/
function normalizePath(p: string): string {
const resolved = realpathSync(p);
const resolved = process.platform === "win32" ? realpathSync.native(p) : realpathSync(p);
return process.platform === "win32" ? resolved.toLowerCase() : resolved;
}

View file

@ -28,7 +28,7 @@ const { assertEq, assertTrue, report } = createTestContext();
* Apply `realpathSync` and lowercase on Windows to eliminate both discrepancies.
*/
function normalizePath(p: string): string {
const resolved = realpathSync(p);
const resolved = process.platform === "win32" ? realpathSync.native(p) : realpathSync(p);
return process.platform === "win32" ? resolved.toLowerCase() : resolved;
}