mirror of
https://github.com/VSCodium/vscodium.git
synced 2026-04-23 19:40:14 +10:00
feat(loong64): use tonistiigi/binfmt:latest (#2549)
This commit is contained in:
@@ -1,15 +1,16 @@
|
|||||||
diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js
|
diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js
|
||||||
index fa8da7d..abd8957 100644
|
index fa8da7d..5e2f51b 100644
|
||||||
--- a/build/npm/postinstall.js
|
--- a/build/npm/postinstall.js
|
||||||
+++ b/build/npm/postinstall.js
|
+++ b/build/npm/postinstall.js
|
||||||
@@ -55,5 +55,7 @@ function npmInstall(dir, opts) {
|
@@ -53,8 +53,9 @@ function npmInstall(dir, opts) {
|
||||||
|
log(dir, `Installing dependencies inside container ${process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME']}...`);
|
||||||
|
|
||||||
opts.cwd = root;
|
opts.cwd = root;
|
||||||
- if (process.env['npm_config_arch'] === 'arm64') {
|
- if (process.env['npm_config_arch'] === 'arm64') {
|
||||||
- run('sudo', ['docker', 'run', '--rm', '--privileged', 'multiarch/qemu-user-static', '--reset', '-p', 'yes'], opts);
|
- run('sudo', ['docker', 'run', '--rm', '--privileged', 'multiarch/qemu-user-static', '--reset', '-p', 'yes'], opts);
|
||||||
- }
|
+ const emulateArchList = ['arm64', 'arm', 'ppc64', 'riscv64', 's390x', 'loong64'];
|
||||||
+ if ((process.env['npm_config_arch'] === 'arm64' || process.env['npm_config_arch'] === 'arm' || process.env['npm_config_arch'] === 'ppc64' || process.env['npm_config_arch'] === 'riscv64' || process.env['npm_config_arch'] === 's390x') && process.env['DISABLE_QEMU'] !== 'true') {
|
+ 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'], opts);
|
+ run('sudo', ['docker', 'run', '--rm', '--privileged', 'tonistiigi/binfmt:latest', '--install', 'all'], opts);
|
||||||
+ } else if (process.env['npm_config_arch'] === 'loong64') {
|
}
|
||||||
+ run('sudo', ['docker', 'run', '--rm', '--privileged', 'loongcr.lcpu.dev/multiarch/archlinux', '--reset', '-p', 'yes'], opts);
|
|
||||||
+ }
|
|
||||||
run('sudo', [
|
run('sudo', [
|
||||||
|
'docker', 'run',
|
||||||
|
|||||||
Reference in New Issue
Block a user