mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-23 19:40:14 +10:00
refactor: patches (#2797)
This commit is contained in:
20
patches/linux/00-remote-fix-bootstrap.patch
Normal file
20
patches/linux/00-remote-fix-bootstrap.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
diff --git a/src/bootstrap-esm.ts b/src/bootstrap-esm.ts
|
||||
index 54681a2..39f72ad 100644
|
||||
--- a/src/bootstrap-esm.ts
|
||||
+++ b/src/bootstrap-esm.ts
|
||||
@@ -6,3 +6,3 @@
|
||||
import * as fs from 'node:fs';
|
||||
-import { register } from 'node:module';
|
||||
+import * as Module from 'node:module';
|
||||
import { product, pkg } from './bootstrap-meta.js';
|
||||
@@ -13,3 +13,3 @@ import { INLSConfiguration } from './vs/nls.js';
|
||||
// Install a hook to module resolution to map 'fs' to 'original-fs'
|
||||
-if (process.env['ELECTRON_RUN_AS_NODE'] || process.versions['electron']) {
|
||||
+if (Module.register && (process.env['ELECTRON_RUN_AS_NODE'] || process.versions['electron'])) {
|
||||
const jsCode = `
|
||||
@@ -28,3 +28,4 @@ if (process.env['ELECTRON_RUN_AS_NODE'] || process.versions['electron']) {
|
||||
}`;
|
||||
- register(`data:text/javascript;base64,${Buffer.from(jsCode).toString('base64')}`, import.meta.url);
|
||||
+ // @ts-ignore
|
||||
+ Module.register(`data:text/javascript;base64,${Buffer.from(jsCode).toString('base64')}`, import.meta.url);
|
||||
}
|
||||
Reference in New Issue
Block a user