From ceb8f73a2a2e724b66e39a7ed433d1b69b2eb8d0 Mon Sep 17 00:00:00 2001 From: bigjakk Date: Sun, 1 Mar 2026 07:30:31 -0800 Subject: [PATCH] =?UTF-8?q?Fix=20Linux=20CI=20build=20=E2=80=94=20don't=20?= =?UTF-8?q?block=20stock=20Electron=20download?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On non-Windows (CI), skip writing path.txt so electron-nightly still downloads the native Linux binary into dist/. The patched Windows binary goes to dist-win/ and is used via -c.electronDist override. Co-Authored-By: Claude Opus 4.6 --- scripts/download-electron.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/download-electron.js b/scripts/download-electron.js index 8663dcc..c015bd3 100644 --- a/scripts/download-electron.js +++ b/scripts/download-electron.js @@ -174,8 +174,11 @@ async function main() { // Write path.txt so the electron package's lazy downloader (index.js) // considers the binary already installed and doesn't re-download stock. - const platformExe = process.platform === 'win32' ? 'electron.exe' : 'electron'; - fs.writeFileSync(path.join(ELECTRON_DIST, '..', 'path.txt'), platformExe); + // On non-Windows (CI cross-compilation), skip this so electron-nightly still + // downloads the native Linux binary into dist/ for the Linux build target. + if (IS_WIN) { + fs.writeFileSync(path.join(ELECTRON_DIST, '..', 'path.txt'), 'electron.exe'); + } // Write marker and verify if (fs.existsSync(VERSION_FILE)) {