-
Notifications
You must be signed in to change notification settings - Fork 31
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
calls external commands #64
Conversation
I think the C As the CLI is based on libuv, I think we should provide an API based on libuv processes. |
I'm not familiar with working with libuv but I'll see if I can throw something up. |
Even if it's only done as a temporary expedient, I think it would make sense to merge this relatively simple PR into the forthcoming v0.4.0 release as it would make a significant difference to what can be done with Wren-cli. An API based on libuv processes can be added later. |
If so, then at least have arguments passed separately using a list. |
Could you explain why there is a need to pass arguments as a list? most users will just pass a single string with the arguments in it anyway. |
Security. |
Could you explain how it would help security? |
If I do, Process.exec("cat \"%(fileName)\"") When |
Of course this quickly gets into:
But I think for starters just a run it and let you know the error code would be trivial. And if UV gets us cross-platform for free, even better. My first ideas for packages require being able to call |
See #94 for a quick pass at this based on UV. |
I believe this will be closed now that we are moving forward with #94. |
Added an
exec
command to theProcess
class that basically wraps C'ssystem()
function so now Wren-cli can call external programs.Example:
Don't think this is a perfect implementation but it's minimal.