Add explicit environment propagation
ci / test (push) Has been cancelled
ci / remote-bench (push) Has been cancelled

This commit is contained in:
DuProcess
2026-06-13 22:30:15 -04:00
parent 38e2fa091a
commit 1b1278f39e
9 changed files with 380 additions and 17 deletions
+4
View File
@@ -42,6 +42,7 @@ pub fn spawn_pty_session(
shell: &str,
cols: u16,
rows: u16,
env: &[(String, String)],
tx: mpsc::UnboundedSender<PtyOutput>,
) -> Result<PtyHandle> {
let pty_system = NativePtySystem::default();
@@ -56,6 +57,9 @@ pub fn spawn_pty_session(
let mut cmd = CommandBuilder::new(shell);
cmd.env("TERM", "xterm-256color");
cmd.env("COLORTERM", "truecolor");
for (name, value) in env {
cmd.env(name, value);
}
cmd.env("SHELL", shell);
if let Some(home) = dirs::home_dir() {
cmd.env("HOME", home.as_os_str());