mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-24 03:50:13 +10:00
refactor: patches (#2797)
This commit is contained in:
15
patches/linux/00-build-improve-qemu.patch
Normal file
15
patches/linux/00-build-improve-qemu.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
diff --git a/build/npm/postinstall.ts b/build/npm/postinstall.ts
|
||||
index ae2651c..3bc46fa 100644
|
||||
--- a/build/npm/postinstall.ts
|
||||
+++ b/build/npm/postinstall.ts
|
||||
@@ -74,5 +74,7 @@ async function npmInstallAsync(dir: string, opts?: child_process.SpawnOptions):
|
||||
|
||||
- if (process.env['npm_config_arch'] === 'arm64') {
|
||||
- run('sudo', ['docker', 'run', '--rm', '--privileged', 'multiarch/qemu-user-static', '--reset', '-p', 'yes'], syncOpts);
|
||||
- }
|
||||
+ const emulateArchList = ['arm64', 'arm', 'ppc64', 'riscv64', 's390x', 'loong64'];
|
||||
+ if (process.env['DISABLE_QEMU'] !== 'true' && !!process.env['npm_config_arch'] && emulateArchList.includes(process.env['npm_config_arch'])) {
|
||||
+ run('sudo', ['docker', 'run', '--rm', '--privileged', 'tonistiigi/binfmt:latest', '--install', 'all'], syncOpts);
|
||||
+ }
|
||||
+
|
||||
run('sudo', [
|
||||
Reference in New Issue
Block a user