-
Notifications
You must be signed in to change notification settings - Fork 258
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
Please support require("system").stdin #188
Comments
Any update on this? Stdin works fine when I use casperjs but when I try to use slimerjs (--engine=slimerjs) my script hangs. The script hangs on the second line below. var system = require('system'); |
So I assume we can do as in slimer.exit() and introduce a quick hack for that: use |
PhantomJS implements both stdin and stderr, but has no documentation for it. At least write() and read() are available as methods. IMHO it would also allow some Node scripts run within SlimerJS or at least ease the conversion, eg // simple wrapper for Node modules |
Phantomjs has on example of stdin/stdout/stderr Would be awesome to see it in slimerjs. |
👍 I really need this to enable slimerjs to be used within a pipeline. Will it be delivered in the next release? |
how long is needed? |
It seems there is no API in the Gecko platform to read stdin.... |
Found a way but it will not work under Windows.. |
Hi @laurentj good day to you. May I check if you are aware of any issue with running SlimerJS system.stdin.read()? I've checked 0.10.3 documentation and the web without error reports. When running below in a CasperJS script within a casper block, the script ends after invoking read(). var system = require('system');
var input = system.stdin.read(); When running outside of a casper block, I get the error message below and the script ends. Error reading from stream: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIBinaryInputStream.readBytes]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://slimerjs/addon-sdk/toolkit/loader.js -> resource://slimerjs/addon-sdk/sdk/io/byte-streams.js :: ByteReader_read :: line 68" data: no] I'm running Firefox 52.0.2, SlimerJS 0.10.3, CasperJS 1.1.4, macOS 10.12.4. |
Just opening a feature request for stdin, which is a commonJS requirement for the system module: http://wiki.commonjs.org/wiki/System/1.0
The slimer.js documentation does not seem to mention stdin and I was enable to figure out how to access it (http://docs.slimerjs.org/current/api/system.html). require("system").stdin works for me with phantomjs.
The text was updated successfully, but these errors were encountered: