(msg = passwordPrompt, password, isRetry)
| 25 | } |
| 26 | |
| 27 | function readPassword (msg = passwordPrompt, password, isRetry) { |
| 28 | if (isRetry && password) { |
| 29 | return password |
| 30 | } |
| 31 | |
| 32 | return read({ prompt: msg, silent: true, default: password || '' }) |
| 33 | .then((rPassword) => readPassword(msg, rPassword, true)) |
| 34 | } |
| 35 | |
| 36 | function readUsername (msg = usernamePrompt, username, isRetry) { |
| 37 | if (isRetry && username) { |