about summary refs log tree commit diff
path: root/editors/code
diff options
context:
space:
mode:
authorAndrei Listochkin <andrei.listochkin@ferrous-systems.com>2022-05-11 13:37:40 +0100
committerAndrei Listochkin <andrei.listochkin@ferrous-systems.com>2022-05-11 15:53:28 +0100
commit33d2c8a3f9530d193bb3563ae9d11d329e8a4c62 (patch)
treed51617fcf7bf66b89871f13908dbafc0e5cc5669 /editors/code
parent684fa2794f0c10280ff7b9fbcda73d5c7c1cf204 (diff)
downloadrust-33d2c8a3f9530d193bb3563ae9d11d329e8a4c62.tar.gz
rust-33d2c8a3f9530d193bb3563ae9d11d329e8a4c62.zip
Enable variable substitutions before passing them over to R-A server
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/src/client.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index 99b72635d18..d28c20aa08f 100644
--- a/editors/code/src/client.ts
+++ b/editors/code/src/client.ts
@@ -6,6 +6,7 @@ import { assert } from './util';
 import { WorkspaceEdit } from 'vscode';
 import { Workspace } from './ctx';
 import { updateConfig } from './config';
+import { substituteVariablesInEnv } from './config';
 
 export interface Env {
     [name: string]: string;
@@ -30,9 +31,9 @@ export async function createClient(serverPath: string, workspace: Workspace, ext
     // TODO?: Workspace folders support Uri's (eg: file://test.txt).
     // It might be a good idea to test if the uri points to a file.
 
-    const newEnv = Object.assign({}, process.env);
-    Object.assign(newEnv, extraEnv);
-
+    const newEnv = substituteVariablesInEnv(Object.assign(
+        {}, process.env, extraEnv
+    ));
     const run: lc.Executable = {
         command: serverPath,
         options: { env: newEnv },