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
+9 -1
View File
@@ -1386,7 +1386,15 @@ impl Terminal {
/// (This is a no-op for display-only terminals.)
fn write_to_pty(&self, input: impl Into<Cow<'static, [u8]>>) {
if let TerminalType::Pty { pty_tx, .. } = &self.terminal_type {
pty_tx.notify(input.into());
let input = input.into();
if log::log_enabled!(log::Level::Debug) {
if let Ok(str) = str::from_utf8(&input) {
log::debug!("Writing to PTY: {:?}", str);
} else {
log::debug!("Writing to PTY: {:?}", input);
}
}
pty_tx.notify(input);
}
}