aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-01-06 11:39:41 +0000
committerGitHub <[email protected]>2020-01-06 11:39:41 +0000
commit1953ac17fd8c93d2145ec3103fd39dd9d6c8fd30 (patch)
treef2cfe17ffcc83d34490c37faed43916fbd36dd08 /editors
parent010d90202102e4e30ecd670e8500170247ef74a6 (diff)
parent695b8ba0f069605836f13cedae194c50df6c10ed (diff)
Merge #2714
2714: Sanity check for missing server binary r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'editors')
-rw-r--r--editors/code/src/client.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index 743384bd7..1ff64a930 100644
--- a/editors/code/src/client.ts
+++ b/editors/code/src/client.ts
@@ -1,5 +1,6 @@
1import { homedir } from 'os'; 1import { homedir } from 'os';
2import * as lc from 'vscode-languageclient'; 2import * as lc from 'vscode-languageclient';
3import { spawnSync } from 'child_process';
3 4
4import { window, workspace } from 'vscode'; 5import { window, workspace } from 'vscode';
5import { Config } from './config'; 6import { Config } from './config';
@@ -13,6 +14,9 @@ export function createClient(config: Config): lc.LanguageClient {
13 } 14 }
14 15
15 const command = expandPathResolving(config.raLspServerPath); 16 const command = expandPathResolving(config.raLspServerPath);
17 if (spawnSync(command, ["--version"]).status !== 0) {
18 window.showErrorMessage(`Unable to execute '${command} --version'`);
19 }
16 const run: lc.Executable = { 20 const run: lc.Executable = {
17 command, 21 command,
18 options: { cwd: folder }, 22 options: { cwd: folder },