WSL - `default_cwd` UNC path only works in the first tab opened
What Operating System(s) are you seeing this problem on?
Windows
Which Wayland compositor or X11 Window manager(s) are you using?
No response
WezTerm version
wezterm 20240520-135708-b8f94c47
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
When default_cwd is an UNC path like //wsl.localhost/Ubuntu-22.04/home/gsuuon from wslpath -am ~ and default_prog is wsl, the first time opening wezterm the cwd is set but the second attempt seems to strip the leading / and error.
To Reproduce
- start wezterm with below config (replacing distro/username)
- open another tab
Configuration
return {
default_prog = { 'wsl' },
default_cwd = '//wsl.localhost/Ubuntu-22.04/home/gsuuon'
}
Expected Behavior
Can open multiple tabs at default_cwd
Logs
22:31:39.537 WARN mux::domain > Directory "/wsl.localhost/Ubuntu-22.04/home/gsuuon/" is not readable and will not be used for the command we are spawning: The system cannot find the path specified. (os error 3)
Anything else?
This shell is not set to report OSC 7, though maybe it's pulling the path some other way?
I tried with a non-~ path and see the same behavior. Also tried with ///wsl.localhost.. and that errors the first time and fails to set cwd the second.
I tried with return { default_domains = 'WSL:Ubuntu-22.04' } and that seems to have the same issue, where the first tab opens to ~ within wsl and the second opens to /mnt/c/Users/gsuuon (on Windows) but there's no error.
inverse is a new color mode adaptive theme color, and we already have secondary, so going to call this fixed in v6-dev. All our theme colors are now color-mode adaptive.