wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

Crash when using wezterm cli to run shell file wo executable permissions

Open thomasaarholt opened this issue 10 months ago • 1 comments

What Operating System(s) are you seeing this problem on?

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20240405-180910-cce0706b

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

I discovered the following bug while using wezterm to create a script integration for the helix (vim-like) text editor. I call a wezterm cli function in order to split the pane, and then run a shell script in that window.

To Reproduce

Create a file called test.sh in your current terminal directory containing:

echo hello
read

Do not alter its permissions. This script should print "hello", and prevent the bash instance from closing until the user presses enter.

Call wezterm cli split-pane -- test.sh in order to create a separate pane, running test.sh in it. Wezterm becomes unresponsive, requiring a force quit.

Now, change the permissions to allow the shell script to be executable via a command like chmod +x test.sh. Rerunning wezterm cli split-pane -- test.sh now succeeds.

Configuration

no config

Expected Behavior

No crashes, possibly an error message like zsh: permission denied: ./test.sh

Logs

# There is only one file with this single line - I deleted all log files, then tried triggering the bug again
15:35:27.003  INFO   wezterm_gui::termwindow > QuitApplication over here (window)

Anything else?

No response

thomasaarholt avatar Apr 12 '24 13:04 thomasaarholt

I can't reproduce this; this is what I see:

Screenshot 2024-05-05 at 17 16 10

is there something else in your config or environment that might be influencing this?

wez avatar May 06 '24 00:05 wez

Curious! I can no longer reproduce the error, and I do get the same behaviour that you describe. Before testing now, I ran brew install wezterm, found no error, and then tried the nightly version with the same result.

I suggest we just close this, and if I can reproduce in the future then we can have another look. Thanks for checking, and for writing a great terminal emulator!

thomasaarholt avatar May 08 '24 06:05 thomasaarholt

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.

github-actions[bot] avatar Jun 08 '24 03:06 github-actions[bot]