From cc8d832af02a17711e4d68fc8bf69c69edb094b7 Mon Sep 17 00:00:00 2001 From: Aleksandr Borovskii Date: Thu, 26 Nov 2026 20:57:53 +0100 Subject: [PATCH] ci: shorten the Windows consumer install path Since VS 18.11 on windows-latest, electron-source-install fails with PathTooLongException in MSBuild's CL task. The scoped package name adds @brightsec twice and makes pnpm hash the .pnpm entry, so the package root was 178 chars against 150 in upstream, where the same job passes on the same image. Dropping the 'nested-' * 4 suffix removes exactly those 28 chars. --- .github/workflows/windows-consumer-install.yaml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/windows-consumer-install.yaml b/.github/workflows/windows-consumer-install.yaml index a570f1b3..dd532d21 100644 --- a/.github/workflows/windows-consumer-install.yaml +++ b/.github/workflows/windows-consumer-install.yaml @@ -84,17 +84,12 @@ jobs: throw 'Packed node-libcurl tarball was not found' } - # 'nested-' * 4 puts the consumer at ~110 chars before node_modules, - # which mirrors what real-world pnpm monorepos hit (workspace + - # a couple of nested package depths). The previous 'nested-' * 12 - # forced moduleRoot to ~256 chars, leaving no headroom under - # MAX_PATH for MSVC's c1xx.exe — that compiler front-end doesn't - # carry the long-path app manifest, so the registry opt-in does - # nothing for it. With *4 we have ~135 chars of slack inside the - # 260-char ceiling for MSBuild's intermediate/log files. - $consumerRoot = Join-Path $env:RUNNER_TEMP ( - 'node-libcurl-consumer-' + ('nested-' * 4) - ) + # Keep this path short. The scoped name puts @brightsec in the path + # twice and makes pnpm hash the .pnpm entry, which adds ~28 chars + # over upstream's unscoped layout. MSBuild's CL task (VS 18.11+) + # throws PathTooLongException once the package root reaches ~178 + # chars, and the long-path registry opt-in does not help it. + $consumerRoot = Join-Path $env:RUNNER_TEMP 'node-libcurl-consumer' New-Item -ItemType Directory -Force -Path $consumerRoot Set-Location $consumerRoot