Skip to content
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

Can't pipe #3

Closed
dscape opened this issue Apr 20, 2012 · 5 comments · Fixed by #22
Closed

Can't pipe #3

dscape opened this issue Apr 20, 2012 · 5 comments · Fixed by #22

Comments

@dscape
Copy link
Contributor

dscape commented Apr 20, 2012

Do you expect users to be able to pipe?

$ echo {} | /usr/local/lib/node_modules/cdir/bin/cdir

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
AssertionError: stdin must be initialized before calling setRawMode
    at Object.setRawMode (tty.js:37:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/cdir/cdir.js:7:5)
    at Module._compile (module.js:432:26)
    at Object..js (module.js:450:10)
    at Module.load (module.js:351:31)
    at Function._load (module.js:310:12)
    at Module.require (module.js:357:17)
    at require (module.js:368:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/cdir/bin/cdir:4:15)
    at Module._compile (module.js:432:26)
@heapwolf
Copy link
Owner

pipes are broken in ~0.6.1x, fixed in nodejs/master.

@TooTallNate
Copy link
Contributor

Maybe look into using /dev/tty as the stdin stream (this could be a little tricky...)

TooTallNate added a commit to TooTallNate/cdir that referenced this issue Jun 16, 2012
 $ echo '{ foo: "bar" }' | cdir

 ^ pure pwnage

Closes heapwolf#3.
@chewbranca
Copy link

On node v0.8.6 anytime I pipe data into cdir I get:

Assertion failed: (!!(events & UV__IO_READ) ^ !!(events & UV__IO_WRITE)), function uv__stream_io, file ../deps/uv/src/unix/stream.c, line 732.

@TooTallNate
Copy link
Contributor

@chewbranca That's a bug in node. See nodejs/node-v0.x-archive#3072. Go make some noise over at that issue if you want to see it fixed.

@chewbranca
Copy link

@TooTallNate thanks for the quick response. I'll post on the other issue as I'm anxious to be able to pipe curl requests into cdir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants