diff options
author | isaacs <i@izs.me> | 2014-01-20 09:07:24 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2014-01-20 09:07:24 +0400 |
commit | b9b4248b06863385db22eb606cbb2b8df1e26450 (patch) | |
tree | 99eeea55c52ed58dfc1431acd8372433e5b48a4a | |
parent | 909cccf0614d07e74783f5a15ec16fbfe628a5cc (diff) |
adduser: All defaults are empty strings if unfound
-rw-r--r-- | lib/adduser.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/adduser.js b/lib/adduser.js index efb069196..739f14243 100644 --- a/lib/adduser.js +++ b/lib/adduser.js @@ -37,7 +37,7 @@ function adduser (args, cb) { function readUsername (c, u, cb) { var v = userValidate.username - read({prompt: "Username: ", default: c.u}, function (er, un) { + read({prompt: "Username: ", default: c.u || ""}, function (er, un) { if (er) { return cb(er.message === "cancelled" ? er.message : er) } @@ -92,8 +92,8 @@ function readPassword (c, u, cb) { function readEmail (c, u, cb) { var v = userValidate.email - - read({prompt: "Email: (this IS public) ", default: c.e}, function (er, em) { + var r = { prompt: "Email: (this IS public) ", default: c.e || "" } + read(r, function (er, em) { if (er) { return cb(er.message === "cancelled" ? er.message : er) } |