You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 10, 2020. It is now read-only.
yarn install calls npm scripts with npm_config_registry=https://registry.yarnpkg.com/ in the environment
however, yarn install would actually use http://x.com to download artifacts
enforce-registry thinks the registry used is https://registry.yarnpkg.com/ (because this npm_config_registry environment variable overrides the .npmrc value when parsed by rc).
Expected Behaviour
enforce-registry thinks the registry used is http://x.com
Yarn's registry selection behaviour is surprising and detection of the registry is not working when the registry is set in
.npmrc..npmrctakes priority over.yarnrcwhen Yarn comes to pick a registry duringinstall. However, enforce-registry does not detect this.npmrcregistry.The relevant Yarn issues are probably yarnpkg/yarn#6700 and yarnpkg/yarn#3683.
Scenario:
.npmrccontainsregistry=http://x.com.yarnrccontains no registryActual Behaviour:
yarn installcalls npm scripts withnpm_config_registry=https://registry.yarnpkg.com/in the environmentyarn installwould actually usehttp://x.comto download artifactshttps://registry.yarnpkg.com/(because thisnpm_config_registryenvironment variable overrides the.npmrcvalue when parsed byrc).Expected Behaviour
http://x.com