aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 e717ab294..b346c0828 100644
--- a/editors/code/src/server.ts
+++ b/editors/code/src/server.ts
@@ -1,5 +1,5 @@
1import { lookpath } from 'lookpath'; 1import { lookpath } from 'lookpath';
2import { homedir } from 'os'; 2import { homedir, platform } from 'os';
3import * as lc from 'vscode-languageclient'; 3import * as lc from 'vscode-languageclient';
4 4
5import { window, workspace } from 'vscode'; 5import { window, workspace } from 'vscode';
@@ -29,10 +29,14 @@ export class Server {
29 } 29 }
30 30
31 const command = expandPathResolving(this.config.raLspServerPath); 31 const command = expandPathResolving(this.config.raLspServerPath);
32 if (!(await lookpath(command))) { 32 // FIXME: remove check when the following issue is fixed:
33 throw new Error( 33 // https://github.com/otiai10/lookpath/issues/4
34 `Cannot find rust-analyzer server \`${command}\` in PATH.` 34 if (platform() !== 'win32') {
35 ); 35 if (!(await lookpath(command))) {
36 throw new Error(
37 `Cannot find rust-analyzer server \`${command}\` in PATH.`
38 );
39 }
36 } 40 }
37 const run: lc.Executable = { 41 const run: lc.Executable = {
38 command, 42 command,