about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/editors/code
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2022-10-18 09:12:49 +0300
committerLaurențiu Nicola <lnicola@dend.ro>2022-10-18 09:12:49 +0300
commitcb8fdff56da1b72ab942e41dc213059d83b58456 (patch)
tree621be08fef2c975ed0909cb980651134117b2359 /src/tools/rust-analyzer/editors/code
parent98a5ac269cffada469753ad2416717e251863f9a (diff)
parent0531aab522f25d6aae30b2cc23a09f4b9257eedc (diff)
downloadrust-cb8fdff56da1b72ab942e41dc213059d83b58456.tar.gz
rust-cb8fdff56da1b72ab942e41dc213059d83b58456.zip
:arrow_up: rust-analyzer
Diffstat (limited to 'src/tools/rust-analyzer/editors/code')
-rw-r--r--src/tools/rust-analyzer/editors/code/src/config.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/editors/code/src/config.ts b/src/tools/rust-analyzer/editors/code/src/config.ts
index a9c0f079b3d..15846a5e864 100644
--- a/src/tools/rust-analyzer/editors/code/src/config.ts
+++ b/src/tools/rust-analyzer/editors/code/src/config.ts
@@ -133,7 +133,21 @@ export class Config {
     }
 
     get runnableEnv() {
-        return this.get<RunnableEnvCfg>("runnableEnv");
+        const item = this.get<any>("runnableEnv");
+        if (!item) return item;
+        const fixRecord = (r: Record<string, any>) => {
+            for (const key in r) {
+                if (typeof r[key] !== "string") {
+                    r[key] = String(r[key]);
+                }
+            }
+        };
+        if (item instanceof Array) {
+            item.forEach((x) => fixRecord(x.env));
+        } else {
+            fixRecord(item);
+        }
+        return item;
     }
 
     get restartServerOnConfigChange() {