aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/main.ts
diff options
context:
space:
mode:
authorBenjamin Coenen <[email protected]>2020-05-10 11:31:55 +0100
committerBenjamin Coenen <[email protected]>2020-05-10 11:31:55 +0100
commite80903a96564c2239489a8c630a4748bf21a3659 (patch)
tree12b31a1fd12deb2120065cea5a558425c8c1984f /editors/code/src/main.ts
parent6203e9c4faee288f16d93dbb7dd0f1f8df487d83 (diff)
parent4578154b608fa075595103d0c933da60d55b25c8 (diff)
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer into feat_4348
Diffstat (limited to 'editors/code/src/main.ts')
-rw-r--r--editors/code/src/main.ts8
1 files changed, 2 insertions, 6 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index efd56a84b..9b020d001 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -8,10 +8,9 @@ import { activateInlayHints } from './inlay_hints';
8import { activateStatusDisplay } from './status_display'; 8import { activateStatusDisplay } from './status_display';
9import { Ctx } from './ctx'; 9import { Ctx } from './ctx';
10import { Config, NIGHTLY_TAG } from './config'; 10import { Config, NIGHTLY_TAG } from './config';
11import { log, assert } from './util'; 11import { log, assert, isValidExecutable } from './util';
12import { PersistentState } from './persistent_state'; 12import { PersistentState } from './persistent_state';
13import { fetchRelease, download } from './net'; 13import { fetchRelease, download } from './net';
14import { spawnSync } from 'child_process';
15import { activateTaskProvider } from './tasks'; 14import { activateTaskProvider } from './tasks';
16 15
17let ctx: Ctx | undefined; 16let ctx: Ctx | undefined;
@@ -179,10 +178,7 @@ async function bootstrapServer(config: Config, state: PersistentState): Promise<
179 178
180 log.debug("Using server binary at", path); 179 log.debug("Using server binary at", path);
181 180
182 const res = spawnSync(path, ["--version"], { encoding: 'utf8' }); 181 if (!isValidExecutable(path)) {
183 log.debug("Checked binary availability via --version", res);
184 log.debug(res, "--version output:", res.output);
185 if (res.status !== 0) {
186 throw new Error(`Failed to execute ${path} --version`); 182 throw new Error(`Failed to execute ${path} --version`);
187 } 183 }
188 184