Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(publish): follow config for registry auth check
The "do you have auth configured" only takes into consideration a hard-coded "registry" config, which means that if you don't have auth configured for the npm registry, but you do for the one you have tied to a scope elsewhere in your npmrc, we would erroneously tell you that to add a token. This uses the same method that the rest of the publish chain uses to determine which registry it would be publishing to, then sees if you have auth for THAT registry. Because that other function does a hard fallback to the npm registry, there is no more need for the exception we throw if you do not have one configured. Also, the npm cli already defaults that config item, so you can't even set it to a falsey value if you wanted
- Loading branch information