Vote count:
0
I have a script:
co = require('co')
prompt = require('co-prompt')
co(function*()
{
yield prompt.confirm("confirm")
process.stdin.pause()
})()
Which waiting for confirmation when I launch it like this:
node --harmony test.js
And not waiting for anything when I send some string into its stdin:
node --harmony test.js <<< ""
How do I reopen process.stdin to make co-prompt work again?
asked 7 mins ago
How to reopen stdin?
Aucun commentaire:
Enregistrer un commentaire