can't use NO_PROXY
env var if proxy is configured via .yarnrc
#710
Labels
bug
Something is not working
NO_PROXY
env var if proxy is configured via .yarnrc
#710
Describe the bug
can't use
NO_PROXY
env var when installing plugins if I set up proxy via yarn config.plugin-plugins
doesn't pass--no-default-rc
flag toyarn
when installing plugins so it will pick what's on~/.yarnrc
.If I set the proxy address via
yarn config set
, then I can't useNO_PROXY
due to a yarn v1 bug:yarnpkg/yarn#5048
To Reproduce
Steps to reproduce the behavior:
yarn config set https-proxy "localhost:8888"
NO_PROXY='registry.yarnpkg.com'
so that it can reach the yarn registryExpected behavior
NO_PROXY
is respected.Idea
plugin-plugins
could pass--use-yarnrc
to save a custom yarn config file that is savesd in the CLI data dir, that way users can still use the global yarn config file without being affected by CLI internals.Also it should set
--no-default-rc
so that no global npmrc/yarnrc file is read.Also tried using
npm_config
env vars to pass proxy settings and passing--no-default-rc
to yarn but it didn't work.Workarounds
Screenshots
1. no yarn/npm config vars, proxy env vars work fine:
NOTE: see second run with the typo in
NO_PROXY
env var, that showsHTTPS_PROXY
is respected.2. proxy set in
.yarnrc
file, install of plugin-org fails when usingNO_PROXY
(can't reach registry)NOTE: in the screenshot I used the local sf CLI and removed plugin-trust to remove the preinstall hook (it does a request that fails b/c
localhost:8888
doesn't exist).3. with suggested workaround
Environment (please complete the following information):
Additional context
Reported in Salesforce CLI repo:
forcedotcom/cli#2540
The text was updated successfully, but these errors were encountered: