Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions lib/commands/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,7 @@ class Profile extends BaseCommand {
value = { old: current, new: newpassword }
}

// FIXME: Work around to not clear everything other than what we're setting
const user = await get(conf)
const newUser = {}

for (const key of writableProfileKeys) {
newUser[key] = user[key]
}

newUser[prop] = value

const result = await otplease(this.npm, conf, c => set(newUser, c))
const result = await otplease(this.npm, conf, c => set({ [prop]: value }, c))

if (this.npm.config.get('json')) {
output.buffer({ [prop]: result[prop] })
Expand Down
Loading