Permalink
Browse files

make example work

  • Loading branch information...
1 parent 75a69b2 commit aafe60c2282c8a4d325aaab7fa5c88123f2ce271 @isaacs isaacs committed Jul 24, 2012
Showing with 6 additions and 11 deletions.
  1. +6 −11 example/example.js
View
17 example/example.js
@@ -2,17 +2,12 @@ var read = require("../lib/read.js")
read({prompt: "Username: ", default: "test-user" }, function (er, user) {
read({prompt: "Password: ", default: "test-pass", silent: true }, function (er, pass) {
- read({prompt: "Enter 4 characters: ", num: 4 }, function (er, four) {
- read({prompt: "Password again: ", default: "test-pass", silent: true }, function (er, pass2) {
- console.error({user: user,
- pass: pass,
- verify: pass2,
- four:four,
- passMatch: (pass === pass2)})
- console.error("If the program doesn't end right now,\n"
- +"then you may be experiencing this bug:\n"
- +"https://github.com/joyent/node/issues/2257")
- })
+ read({prompt: "Password again: ", default: "test-pass", silent: true }, function (er, pass2) {
+ console.error({user: user,
+ pass: pass,
+ verify: pass2,
+ passMatch: (pass === pass2)})
+ console.error("the program should exit now")
})
})
})

0 comments on commit aafe60c

Please sign in to comment.