diff --git a/lib/commands/profile.js b/lib/commands/profile.js index 2e11f93788f99..fc5b1963596c9 100644 --- a/lib/commands/profile.js +++ b/lib/commands/profile.js @@ -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] })