yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.44k stars 2.73k forks source link

NPM_CONFIG_USERCONFIG seems broken #4568

Closed timdp closed 3 years ago

timdp commented 7 years ago

Do you want to request a feature or report a bug?

A bug.

What is the current behavior?

Setting npm_config_userconfig to a path to npmrc with //registry.npmjs.org/:_authToken=TOKEN_HERE doesn't seem to work anymore. The token is never read.

What is the expected behavior?

Installation should use the token from my custom npmrc during installation. Seb originally added support for this in #1519.

To be clear: what I'm doing is running this on a CI-like server, where users are able to supply their own registry token, allowing the server to install their private packages. I write the token to a temp file and pass the path to the file in the environment variable for the yarn process.

This worked with 0.28.4 and is broken in 1.x.

Thanks!

BYK commented 3 years ago

Just tested this with yarn config list and it shows up under npm config section.

Closing for now but feel free to report back if this is still an issue.