diff options
author | Laurențiu Nicola <[email protected]> | 2021-01-07 14:33:00 +0000 |
---|---|---|
committer | Laurențiu Nicola <[email protected]> | 2021-01-07 14:37:08 +0000 |
commit | c547ec1cd6fb764d7ad7c1e8b066b90038b44920 (patch) | |
tree | 04ff5c554a9d2de7d5f653e7bc515090b0dbd817 /editors | |
parent | 959406aeb5379024bd7b2143688cfa07e073fc99 (diff) |
Don't update the server if managed by the user
Diffstat (limited to 'editors')
-rw-r--r-- | editors/code/src/main.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 4c132cabe..694da9409 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts | |||
@@ -167,6 +167,7 @@ async function bootstrapExtension(config: Config, state: PersistentState): Promi | |||
167 | } | 167 | } |
168 | return; | 168 | return; |
169 | }; | 169 | }; |
170 | if (serverPath(config) !== null) return; | ||
170 | 171 | ||
171 | const now = Date.now(); | 172 | const now = Date.now(); |
172 | if (config.package.releaseTag === NIGHTLY_TAG) { | 173 | if (config.package.releaseTag === NIGHTLY_TAG) { |
@@ -278,7 +279,7 @@ async function patchelf(dest: PathLike): Promise<void> { | |||
278 | } | 279 | } |
279 | 280 | ||
280 | async function getServer(config: Config, state: PersistentState): Promise<string | undefined> { | 281 | async function getServer(config: Config, state: PersistentState): Promise<string | undefined> { |
281 | const explicitPath = process.env.__RA_LSP_SERVER_DEBUG ?? config.serverPath; | 282 | const explicitPath = serverPath(config); |
282 | if (explicitPath) { | 283 | if (explicitPath) { |
283 | if (explicitPath.startsWith("~/")) { | 284 | if (explicitPath.startsWith("~/")) { |
284 | return os.homedir() + explicitPath.slice("~".length); | 285 | return os.homedir() + explicitPath.slice("~".length); |
@@ -351,6 +352,10 @@ async function getServer(config: Config, state: PersistentState): Promise<string | |||
351 | return dest; | 352 | return dest; |
352 | } | 353 | } |
353 | 354 | ||
355 | function serverPath(config: Config): string | null { | ||
356 | return process.env.__RA_LSP_SERVER_DEBUG ?? config.serverPath; | ||
357 | } | ||
358 | |||
354 | async function isNixOs(): Promise<boolean> { | 359 | async function isNixOs(): Promise<boolean> { |
355 | try { | 360 | try { |
356 | const contents = await fs.readFile("/etc/os-release"); | 361 | const contents = await fs.readFile("/etc/os-release"); |