Skip to content

Commit 9a6294d

Browse files
committed
Auto merge of rust-lang#13993 - OmarTawfik-forks:fix-server-path, r=Veykril
fix: substitute vscode variables in `config.serverPath` From comment by `@Veykril` in rust-lang/rust-analyzer#13939 (comment): > Yep, we pull the server path first, then substitute the configs, that's the wrong order. https://github.com/rust-lang/rust-analyzer/blob/6e52c64031825920983515b9e975e93232739f7f/editors/code/src/ctx.ts#L155-L161 Fixes rust-lang#13939
2 parents 303737d + 7198cd0 commit 9a6294d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

editors/code/src/bootstrap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as vscode from "vscode";
22
import * as os from "os";
3-
import { Config } from "./config";
3+
import { Config, substituteVSCodeVariables } from "./config";
44
import { log, isValidExecutable } from "./util";
55
import { PersistentState } from "./persistent_state";
66
import { exec } from "child_process";
@@ -132,7 +132,7 @@ async function getServer(
132132
return undefined;
133133
}
134134
function serverPath(config: Config): string | null {
135-
return process.env.__RA_LSP_SERVER_DEBUG ?? config.serverPath;
135+
return process.env.__RA_LSP_SERVER_DEBUG ?? substituteVSCodeVariables(config.serverPath);
136136
}
137137

138138
async function isNixOs(): Promise<boolean> {

0 commit comments

Comments
 (0)