-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix figgyPudding error in npm token
#259
Conversation
It seems that a couple of lines were missed when token.js was [changed to use figgyPudding](4cf850d#diff-398ed3b014436a5204583323ea29320b), which [causes an error](https://npm.community/t/npm-token-err-figgypudding-options-cannot-be-modified-use-concat-instead/10288) when trying to run that command in certain circumstances. This patch fixes that error. Tested locally by applying the patch to npm 6.11.3.
} | ||
if (conf.otp) conf.auth.otp = conf.otp | ||
if (conf.otp) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This second bit is actually not what you want. It means that npm token <whatever> --otp=123456
will throw away the auth.
Since we've already set auth
to an object, we can modify that object, because it's not a key on the figgy pudding container.
I'll land this, but without that part, just posting this comment for posterity :)
It seems that a couple of lines were missed when token.js was changed to use figgyPudding, which causes an error when trying to run that command in certain circumstances. This patch fixes that error.
Tested locally by applying the patch to npm 6.11.3.