Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: Only translate environment variables up to the first colon
As discussed on npm.community[1], the fact that npm registry authentication tokens cannot be defined using environment variables does not seem justified anymore. The restriction is caused by the config loader translating * all `_` to `-` * the whole variable name to lowercase while the credential checker expects a key ending in `:_authToken`. As suggested, this change fixes the problem by limiting the translation by the config loader to the part *before* the first colon. Closes #15565 [1]: https://npm.community/t/cannot-set-npm-config-keys-containing-underscores-registry-auth-tokens-for-example-via-npm-config-environment-variables/233
- Loading branch information