mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 13:21:38 +03:00
mux: avoid inheriting wrong pane/socket env
The first problem in #1222 is that the environment in the spawned mux server has inherited the unix socket path from the GUI that is the client, rather than the mux server. That means that `wezterm cli` is operating on the mux namespace of the client (which is a layered/wrapped view of the mux server), rather than the mux server. This fixes `wezterm cli split-pane` in the case where unix domains are in use together with `connect_automatically = true`, although there is still a really weird issue with tabs that needs to be run down. refs: https://github.com/wez/wezterm/issues/1225 (sort of) refs: https://github.com/wez/wezterm/issues/1222
This commit is contained in:
parent
e7fc5f0e9e
commit
fb50014ed5
@ -139,6 +139,8 @@ fn run() -> anyhow::Result<()> {
|
||||
"SSH_AUTH_SOCK",
|
||||
"SSH_CLIENT",
|
||||
"SSH_CONNECTION",
|
||||
"WEZTERM_PANE",
|
||||
"WEZTERM_UNIX_SOCKET",
|
||||
"_",
|
||||
] {
|
||||
std::env::remove_var(name);
|
||||
@ -211,6 +213,7 @@ mod ossl;
|
||||
pub fn spawn_listener() -> anyhow::Result<()> {
|
||||
let config = configuration();
|
||||
for unix_dom in &config.unix_domains {
|
||||
std::env::set_var("WEZTERM_UNIX_SOCKET", unix_dom.socket_path());
|
||||
let mut listener = wezterm_mux_server_impl::local::LocalListener::with_domain(unix_dom)?;
|
||||
thread::spawn(move || {
|
||||
listener.run();
|
||||
|
Loading…
Reference in New Issue
Block a user