Skip to content

Commit 1953ac1

Browse files
bors[bot]matklad
andauthored
Merge #2714
2714: Sanity check for missing server binary r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2 parents 010d902 + 695b8ba commit 1953ac1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

editors/code/src/client.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { homedir } from 'os';
22
import * as lc from 'vscode-languageclient';
3+
import { spawnSync } from 'child_process';
34

45
import { window, workspace } from 'vscode';
56
import { Config } from './config';
@@ -13,6 +14,9 @@ export function createClient(config: Config): lc.LanguageClient {
1314
}
1415

1516
const command = expandPathResolving(config.raLspServerPath);
17+
if (spawnSync(command, ["--version"]).status !== 0) {
18+
window.showErrorMessage(`Unable to execute '${command} --version'`);
19+
}
1620
const run: lc.Executable = {
1721
command,
1822
options: { cwd: folder },

0 commit comments

Comments
 (0)