Closed keturiosakys closed 10 months ago
In the meantime, take a look at https://wezfurlong.org/wezterm/config/lua/wezterm/run_child_process.html
Thanks! Got it working with run_child_process
interface.
FWIW, that userdata error is specific to the debug overlay; it's trying to figure out how to print it nicely, and failing.
If you assign the value to a variable, then it does work:
> p = io.popen('/bin/ls')
> p:read('*all')
This should be resolved now in main
.
Please take a few moments to try out the fix and let me know how that works out. You can find the nightly downloads for your system in the wezterm installation docs.
If you prefer to use packages provided by your distribution or package manager of choice and don't want to replace that with a nightly download, keep in mind that you can download portable packages (eg: a .dmg
file on macOS, a .zip
file on Windows and an .AppImage
file on Linux) that can be run without permanently installing or replacing an existing package, and can then simply be deleted once you no longer need them.
If you are eager and can build from source then you may be able to try this out more quickly.
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?
macOS
Which Wayland compositor or X11 Window manager(s) are you using?
-
WezTerm version
20230530-062729-95e44f21
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
Attempting to run
io.popen()
command with any valid input command string passed in results in the following error:Error getting metatable: userdata is not expected type
The error seems to be reported from the
luahelper
package (line 415 insrc/lib.rs
and theuserdata is not expected type
is an error frommlua
crate but this is as far as I could get.To Reproduce
io.popen("/bin/ls")
Configuration
no config
Expected Behavior
Command runs successfully
Logs
No response
Anything else?
No response