Skip to content

Commit 543e52a

Browse files
author
Tajudeen
committed
Fix build issues for VS Code 1.106 compatibility
- Fix rimraf import: use require() for CommonJS rimraf 2.2.8 - Add electron custom repository support for alternative architectures - Enables VSCODE_ELECTRON_REPOSITORY and VSCODE_ELECTRON_TAG env vars
1 parent 9f534a9 commit 543e52a

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

build/gulpfile.vscode.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,19 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
373373
.pipe(util.skipDirectories())
374374
.pipe(util.fixWin32DirectoryPermissions())
375375
.pipe(filter(['**', '!**/.github/**'], { dot: true })) // https://github.com/microsoft/vscode/issues/116523
376-
.pipe(electron({ ...config, platform, arch: arch === 'armhf' ? 'arm' : arch, ffmpegChromium: false }))
376+
377+
// CORTEXIDE/VSCODIUM: Support custom Electron repositories for alternative architectures
378+
// This allows using VSCODE_ELECTRON_REPOSITORY and VSCODE_ELECTRON_TAG env vars
379+
let electronOverride = {};
380+
if (process.env.VSCODE_ELECTRON_REPOSITORY) {
381+
electronOverride.repo = process.env.VSCODE_ELECTRON_REPOSITORY;
382+
}
383+
if (process.env.VSCODE_ELECTRON_TAG) {
384+
electronOverride.tag = process.env.VSCODE_ELECTRON_TAG;
385+
}
386+
const hasElectronOverride = electronOverride.repo || electronOverride.tag;
387+
388+
.pipe(electron({ ...config, ...(hasElectronOverride ? electronOverride : {}), platform, arch: arch === 'armhf' ? 'arm' : arch, ffmpegChromium: false }))
377389
.pipe(filter(['**', '!LICENSE', '!version'], { dot: true }));
378390

379391
if (platform === 'linux') {

0 commit comments

Comments
 (0)