swellaby / dev-setup-windows

Scripts and utilities for setting up a dev environment for working on Swellaby repos
MIT License
0 stars 0 forks source link

npm/yo health check failure emits warning due to proxy settings #31

Open calebcartwright opened 3 years ago

calebcartwright commented 3 years ago

We currently install the yo npm package to add setup fro running yeoman generators. The yo package has a post-install health check and one of the things this does is check registry connectivity over http. Internally it uses global-agent, which does not directly utilize the standard proxy environment variables, but instead utilizes prefixed versions of the standard vars (foo_https_proxy instead of https_proxy).

https://github.com/swellaby/dev-setup-windows/blob/50b89ef2adbe955ae7b7d60a150b1bc867a60faa/src/ProgrammingFrameworks.ps1#L25

This isn't terribly impactful, though it does make the install hang for a while as it will sit and wait til the request times out. To avoid leaking internals, it'd probably be best to check the standard env vars and if they are set then configure the global-agent proxies accordingly before running the npm install so that the yo health check will pass.

https://www.npmjs.com/package/global-agent#environment-variables