settings: Skip terminal env vars with substitutions in vscode import (#42464)

Closes https://github.com/zed-industries/zed/issues/40547

Release Notes:

- Fixed vscode import creating faulty terminal env vars in terminal
settings
This commit is contained in:
Lukas Wirth
2025-11-11 16:15:12 +00:00
committed by GitHub
parent 03acbb7de3
commit 83351283e4
3 changed files with 17 additions and 5 deletions
+7 -1
View File
@@ -753,7 +753,13 @@ impl VsCodeSettings {
let env = self
.read_value(&format!("terminal.integrated.env.{platform}"))
.and_then(|v| v.as_object())
.map(|v| v.iter().map(|(k, v)| (k.clone(), v.to_string())).collect());
.map(|v| {
v.iter()
.map(|(k, v)| (k.clone(), v.to_string()))
// zed does not support substitutions, so this can break env vars
.filter(|(_, v)| !v.contains('$'))
.collect()
});
ProjectTerminalSettingsContent {
// TODO: handle arguments