Skip to content

Commit

Permalink
fixup! fix: npm profile refactor
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan Harband <ljharb@gmail.com>
  • Loading branch information
ruyadorno and ljharb committed Dec 17, 2020
1 parent ed0f8c0 commit 640fbc2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/profile.js
Expand Up @@ -68,7 +68,7 @@ const profile = async (args) => {
case 'set':
return set(opts)
default:
throw new Error('Unknown profile command: ' + args[0])
throw new Error('Unknown profile command: ' + subcmd)
}
}

Expand Down Expand Up @@ -121,8 +121,7 @@ async function get (args) {
const values = args // comma or space separated
.join(',')
.split(/,/)
.map((arg) => arg.trim())
.filter((arg) => arg !== '')
.filter((arg) => arg.trim() !== '')
.map((arg) => cleaned[arg])
.join('\t')
output(values)
Expand Down Expand Up @@ -166,7 +165,7 @@ async function set (args) {

if (newpassword !== confirmedpassword) {
log.warn('profile', 'Passwords do not match, please try again.')
return await readPasswords()
return readPasswords()
}

return newpassword
Expand Down

0 comments on commit 640fbc2

Please sign in to comment.