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

fails in node 0.10 on OS X #8

Closed
davidmarkclements opened this issue Dec 5, 2015 · 2 comments
Closed

fails in node 0.10 on OS X #8

davidmarkclements opened this issue Dec 5, 2015 · 2 comments

Comments

@davidmarkclements
Copy link
Collaborator

this is due to reading from /dev/stdin

/usr/bin/tty will output the current tty e.g. /dev/ttys006 - this can be used instead,
but spawning /usr/bin/tty has to be done async on node 0.10 - which means there
would be an async setup step.

$ node --version
v0.10.40
$ node -e "require('prompt-sync').prompt()"

fs.js:488
  var r = binding.read(fd, buffer, offset, length, position);
                  ^
Error: EAGAIN, resource temporarily unavailable
    at Object.fs.readSync (fs.js:488:19)
    at Object.prompt (/Users/davidclements/z/nearForm/fuge/fuge/node_modules/prompt-sync/index.js:54:15)
    at [eval]:1:24
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:456:26)
    at evalScript (node.js:565:25)
    at startup (node.js:80:7)
    at node.js:935:3
@davidmarkclements
Copy link
Collaborator Author

you can point at /dev/tty instead of /dev/stdin and this problem goes away..

need to confirm for linux

@davidmarkclements
Copy link
Collaborator Author

have a solution: PR here: #9

heapwolf added a commit that referenced this issue Dec 14, 2015
windows and node 0.10 support (closes #4 and #8)
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

No branches or pull requests

1 participant