about summary refs log tree commit diff
path: root/editors/code
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2019-12-08 21:08:46 +0200
committerLaurențiu Nicola <lnicola@dend.ro>2019-12-08 21:14:18 +0200
commitee2bc73d2a8bb5479019609b495c65d1d6132d9b (patch)
treee479ccc45e97f218b8d7276bf70693506449867a /editors/code
parent6b1c2ee168151db07e42403c37106491ff45c5e6 (diff)
downloadrust-ee2bc73d2a8bb5479019609b495c65d1d6132d9b.tar.gz
rust-ee2bc73d2a8bb5479019609b495c65d1d6132d9b.zip
Code: don't check for ra_lsp_server on Windows
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/src/server.ts14
1 files changed, 9 insertions, 5 deletions
diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts
index e717ab294d7..b346c08288d 100644
--- a/editors/code/src/server.ts
+++ b/editors/code/src/server.ts
@@ -1,5 +1,5 @@
 import { lookpath } from 'lookpath';
-import { homedir } from 'os';
+import { homedir, platform } from 'os';
 import * as lc from 'vscode-languageclient';
 
 import { window, workspace } from 'vscode';
@@ -29,10 +29,14 @@ export class Server {
         }
 
         const command = expandPathResolving(this.config.raLspServerPath);
-        if (!(await lookpath(command))) {
-            throw new Error(
-                `Cannot find rust-analyzer server \`${command}\` in PATH.`
-            );
+        // FIXME: remove check when the following issue is fixed:
+        // https://github.com/otiai10/lookpath/issues/4
+        if (platform() !== 'win32') {
+            if (!(await lookpath(command))) {
+                throw new Error(
+                    `Cannot find rust-analyzer server \`${command}\` in PATH.`
+                );
+            }
         }
         const run: lc.Executable = {
             command,