diff options
author | Benjamin Coenen <[email protected]> | 2020-05-10 11:31:55 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-05-10 11:31:55 +0100 |
commit | e80903a96564c2239489a8c630a4748bf21a3659 (patch) | |
tree | 12b31a1fd12deb2120065cea5a558425c8c1984f /editors/code/src/main.ts | |
parent | 6203e9c4faee288f16d93dbb7dd0f1f8df487d83 (diff) | |
parent | 4578154b608fa075595103d0c933da60d55b25c8 (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.ts | 8 |
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'; | |||
8 | import { activateStatusDisplay } from './status_display'; | 8 | import { activateStatusDisplay } from './status_display'; |
9 | import { Ctx } from './ctx'; | 9 | import { Ctx } from './ctx'; |
10 | import { Config, NIGHTLY_TAG } from './config'; | 10 | import { Config, NIGHTLY_TAG } from './config'; |
11 | import { log, assert } from './util'; | 11 | import { log, assert, isValidExecutable } from './util'; |
12 | import { PersistentState } from './persistent_state'; | 12 | import { PersistentState } from './persistent_state'; |
13 | import { fetchRelease, download } from './net'; | 13 | import { fetchRelease, download } from './net'; |
14 | import { spawnSync } from 'child_process'; | ||
15 | import { activateTaskProvider } from './tasks'; | 14 | import { activateTaskProvider } from './tasks'; |
16 | 15 | ||
17 | let ctx: Ctx | undefined; | 16 | let 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 | ||