1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-28 01:06:37 +03:00

mux: unset misc env vars when starting the mux server

This commit is contained in:
Wez Furlong 2020-02-24 08:24:33 -08:00
parent 54047e357a
commit b46d2f054a

View File

@ -583,6 +583,23 @@ fn run_terminal_gui(config: config::ConfigHandle, opts: StartCommand) -> anyhow:
_ => return Err(err.into()),
}
}
// Remove some environment variables that aren't super helpful or
// that are potentially misleading when we're starting up the
// server.
// We may potentially want to look into starting/registering
// a session of some kind here as well in the future.
for name in &[
"OLDPWD",
"PWD",
"SHLVL",
"SSH_AUTH_SOCK",
"SSH_CLIENT",
"SSH_CONNECTION",
"_",
] {
std::env::remove_var(name);
}
}
}