Skip to content

Commit 5a0d256

Browse files
Tajudeenclaude
andcommitted
fix(build-vscode): support VSCODE_ELECTRON_REPOSITORY/_TAG env vars in gulpfile
ppc64le/loong64/riscv64 builds use community Electron forks (lex-ibm, darkyzhou, riscv-forks) because the official electron releases lack those binaries. cortexide-builder's package_bin.sh exports VSCODE_ELECTRON_REPOSITORY + VSCODE_ELECTRON_TAG and previously relied on a .js patch step to make the gulpfile honor them — but cortexide ships gulpfile.vscode.ts (no .js), so the patch attempt failed with ENOENT and exited 1 for those archs. Add native env-var support in the .ts source: when set, merge \`{ repo, tag }\` into electronConfig before the spread that builds the @electron/get options. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d2a6cd4 commit 5a0d256

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

build/gulpfile.vscode.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,11 +525,22 @@ function packageTask(platform: string, arch: string, sourceFolderName: string, d
525525
all = es.merge(all, shortcut, policyDest);
526526
}
527527

528+
// Allow overriding the Electron repo + tag via env vars so community arch builds
529+
// (ppc64le/loong64/riscv64) can pull from arch-specific forks (lex-ibm, darkyzhou,
530+
// riscv-forks) instead of the official electron releases that lack those binaries.
531+
const electronOverride: { repo?: string; tag?: string } = {};
532+
if (process.env['VSCODE_ELECTRON_REPOSITORY']) {
533+
electronOverride.repo = process.env['VSCODE_ELECTRON_REPOSITORY'];
534+
}
535+
if (process.env['VSCODE_ELECTRON_TAG']) {
536+
electronOverride.tag = process.env['VSCODE_ELECTRON_TAG'];
537+
}
528538
const electronConfig = {
529539
...config,
530540
platform,
531541
arch: arch === 'armhf' ? 'arm' : arch,
532542
ffmpegChromium: false,
543+
...electronOverride,
533544
...(embedded ? {
534545
darwinMiniAppName: embedded.nameShort,
535546
darwinMiniAppDisplayName: embedded.nameLong,

0 commit comments

Comments
 (0)