| 165 | let value = args.length > 1 ? args.slice(1).join(' ') : null |
| 166 | |
| 167 | const readPasswords = async () => { |
| 168 | const newpassword = await readUserInfo.password('New password: ') |
| 169 | const confirmedpassword = await readUserInfo.password(' Again: ') |
| 170 | |
| 171 | if (newpassword !== confirmedpassword) { |
| 172 | log.warn('profile', 'Passwords do not match, please try again.') |
| 173 | return readPasswords() |
| 174 | } |
| 175 | |
| 176 | return newpassword |
| 177 | } |
| 178 | |
| 179 | if (prop !== 'password' && value === null) { |
| 180 | throw new Error('npm profile set <prop> <value>') |