diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2022-10-18 09:12:49 +0300 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2022-10-18 09:12:49 +0300 |
| commit | cb8fdff56da1b72ab942e41dc213059d83b58456 (patch) | |
| tree | 621be08fef2c975ed0909cb980651134117b2359 /src/tools/rust-analyzer/editors/code | |
| parent | 98a5ac269cffada469753ad2416717e251863f9a (diff) | |
| parent | 0531aab522f25d6aae30b2cc23a09f4b9257eedc (diff) | |
| download | rust-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.ts | 16 |
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() { |
