Skip to content

Instantly share code, notes, and snippets.

@scoates
Created September 13, 2010 04:04
Show Gist options
  • Select an option

  • Save scoates/576786 to your computer and use it in GitHub Desktop.

Select an option

Save scoates/576786 to your computer and use it in GitHub Desktop.
sarcasm:~/src/tmp$ cat repl.js
repl = require("repl");
repl.start("testrepl> ");
sarcasm:~/src/tmp$ node repl.js
testrepl> 5+5
10
testrepl> sarcasm:~/src/tmp$ echo "5+5" | node repl.js
node.js:63
throw e;
^
Error: ENOTTY, Inappropriate ioctl for device
at new Interface (readline:41:11)
at Object.createInterface (readline:19:10)
at new REPLServer (repl:53:27)
at Object.start (repl:129:10)
at Object.<anonymous> (/Users/sean/src/tmp/repl.js:2:6)
at Module._compile (node.js:462:23)
at Module._loadScriptSync (node.js:469:10)
at Module.loadSync (node.js:338:12)
at Object.runMain (node.js:522:24)
at Array.<anonymous> (node.js:755:12)
sarcasm:~/src/tmp$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment