-
Notifications
You must be signed in to change notification settings - Fork 43
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
Implement Process methods from dart:io #50
Comments
Hi, you are right. I haven't had a chance to implement There are bindings for Node's I can take a look at this later this week or during the weekend. You are also welcome to submit a pull request if you need this sooner. |
ah okay great, I think |
Hey @pulyaevskiy I'm having difficulty with assigning a listener for ChildProcess events. Don't suppose you can see anything obvious? final resize = childProcess.spawn('convert', [ ... ]);
resize
..on('error', (error) { ... })
..on('close', (int code, String signal) { ... })
..on('exit', (int code, String signal) { ... }); I'm getting the following error:
I've tried using the other EventEmitter methods like once, addListener etc but not having any luck. Thanks |
Hey, yes. Any function you pass from Dart to JS must be wrapped with In your example it would be something like: final resize = childProcess.spawn('convert', [ ... ]);
resize
..on('error', allowInterop((error) { ... }))
..on('close', allowInterop((int code, String signal) { ... }))
..on('exit', allowInterop((int code, String signal) { ... })); |
Ahh - I did briefly consider that but I assumed that the library would be handling that. Having said that I had the child_prcess.dart open and could see what it was doing, clearly not got my head in gear for 2019 yet! :) Thanks |
This is why I also created I'll try to find some time for the Process APIs in |
Hey, I'm using this library in the context of a firebase cloud function. I'm trying to utilise imagemagik from the cloud function. In JS this would be
exec(...)
and withdart:io
i'd useProcess.run(...)
. I can't find an alternative innode_io
?Thanks
The text was updated successfully, but these errors were encountered: