From 2344dac183cf95c6d1ac9104fa5e55af38534402 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Tue, 11 Feb 2020 02:29:11 +0200 Subject: vscode: filter out arm linux from using prebuilt binaries --- editors/code/src/config.ts | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'editors') diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index d5f3da2ed..418845436 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts @@ -64,9 +64,24 @@ export class Config { * `platform` on GitHub releases. (It is also stored under the same name when * downloaded by the extension). */ - private static prebuiltLangServerFileName(platform: NodeJS.Platform): null | string { + private static prebuiltLangServerFileName( + platform: NodeJS.Platform, + arch: string + ): null | string { + // See possible `arch` values here: + // https://nodejs.org/api/process.html#process_process_arch + switch (platform) { - case "linux": return "ra_lsp_server-linux"; + + case "linux": { + switch (arch) { + case "arm": + case "arm64": return null; + + default: return "ra_lsp_server-linux"; + } + } + case "darwin": return "ra_lsp_server-mac"; case "win32": return "ra_lsp_server-windows.exe"; @@ -95,7 +110,9 @@ export class Config { }; } - const prebuiltBinaryName = Config.prebuiltLangServerFileName(process.platform); + const prebuiltBinaryName = Config.prebuiltLangServerFileName( + process.platform, process.arch + ); if (!prebuiltBinaryName) return null; -- cgit v1.2.3