about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-10-21 10:18:54 +0200
committerRalf Jung <post@ralfj.de>2022-10-21 10:18:54 +0200
commit26a413e015b7fef4c0edb51bda0d39ab499f4950 (patch)
tree26184df803344b52f3cd9d012f00847511179ebf /editors/code/src
parent4b61e5ecc8d08b617a666e506b34b92398d42ce1 (diff)
parenta99a48e78600b5dfd39dec730d7fedfae8f48ff6 (diff)
downloadrust-26a413e015b7fef4c0edb51bda0d39ab499f4950.tar.gz
rust-26a413e015b7fef4c0edb51bda0d39ab499f4950.zip
merge rustc history
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/config.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts
index a9c0f079b3d..15846a5e864 100644
--- a/editors/code/src/config.ts
+++ b/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() {