npm profile enable-2fa does not accept --json and --parseable options


(Alejandro López) #1

Hello.

npm profile documentation says that all profile subcommands accept --json and --parseable options, but this is not true.

Evidence: https://github.com/npm/cli/blob/latest/lib/profile.js#L230

npm ERR! Enabling two-factor authentication is an interactive operation and JSON output mode is not available
{
  "error": {
    "summary": "Enabling two-factor authentication is an interactive operation and JSON output mode is not available",
    "detail": ""
  }
}

So… What is the right thing? I can make a PR to fix this.

Thank you.


(system) #2

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.