New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI commands do not work within shell started with wezterm start -- <SHELL>
#3679
Comments
See https://wezfurlong.org/wezterm/cli/cli/index.html#targeting-the-correct-instance for how the CLI resolves the wezterm instance. There are certain wezterm specific environment variables that should be set and that are maybe not set in this scenario. Can you share a list of all of the environment variables starting with WEZTERM in that shell? In a regular posix shell, you'd run |
Something else I found, from an existing Wezterm GUI instance, |
When spawning, ensure that we set WEZTERM_UNIX_SOCKET to our current value to match the PANE that we export. refs: #3679
I've pushed a commit that should be more consistent about setting It typically takes about an hour before commits are available as nightly builds for all platforms. Please take a few moments to try out the change and let me know how that works out. |
Yup that did it, can confirm |
Thanks for confirming! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
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 20230501-084619-d0e9a034
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 starting a one off program using
wezterm start -- <program>
as described here,wezterm cli
commands within this shell fails withfailed to connect to Socket("gui-sock-XXXXX")
.However, if a pane is split from the problematic shell, cli commands work in the split pane as expected, albeit with an error ( EDIT: It looks like this error happens regardless of this issue, IE: when just using
wezterm start
) in the logs on the first cli command.To Reproduce
wezterm start -- nu
or any shell for that matterwezterm cli list --format json
wezterm cli list --format json
in the new paneConfiguration
Curiously, the bug do not reproduce with
wezterm -n start -- nu
, yet reproduce withwezterm start -- nu
with an empty config such as belowreturn {}
Expected Behavior
wezterm cli
commands should workLogs
16:42:47.552 ERROR wezterm_mux_server_impl::local > encoding PDU to client: writing pdu data buffer: An existing connection was forcibly closed by the remote host. (os error 10054) (EDIT: It looks like this error happens regardless of this issue, IE: when just using
wezterm start
)Anything else?
CLI commands do not work with empty config
CLI commands works with skip config
CLI commands works in a split pane from the problematic shell
The text was updated successfully, but these errors were encountered: