diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-01-06 11:39:41 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-06 11:39:41 +0000 |
| commit | 1953ac17fd8c93d2145ec3103fd39dd9d6c8fd30 (patch) | |
| tree | f2cfe17ffcc83d34490c37faed43916fbd36dd08 /editors/code/src | |
| parent | 010d90202102e4e30ecd670e8500170247ef74a6 (diff) | |
| parent | 695b8ba0f069605836f13cedae194c50df6c10ed (diff) | |
| download | rust-1953ac17fd8c93d2145ec3103fd39dd9d6c8fd30.tar.gz rust-1953ac17fd8c93d2145ec3103fd39dd9d6c8fd30.zip | |
Merge #2714
2714: Sanity check for missing server binary r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Diffstat (limited to 'editors/code/src')
| -rw-r--r-- | editors/code/src/client.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index 743384bd783..1ff64a9303a 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts @@ -1,5 +1,6 @@ import { homedir } from 'os'; import * as lc from 'vscode-languageclient'; +import { spawnSync } from 'child_process'; import { window, workspace } from 'vscode'; import { Config } from './config'; @@ -13,6 +14,9 @@ export function createClient(config: Config): lc.LanguageClient { } const command = expandPathResolving(config.raLspServerPath); + if (spawnSync(command, ["--version"]).status !== 0) { + window.showErrorMessage(`Unable to execute '${command} --version'`); + } const run: lc.Executable = { command, options: { cwd: folder }, |
