Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node feature does not pick up proxy settings #702

Closed
jmedelmann opened this issue Sep 25, 2023 · 4 comments
Closed

Node feature does not pick up proxy settings #702

jmedelmann opened this issue Sep 25, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@jmedelmann
Copy link
Contributor

jmedelmann commented Sep 25, 2023

The install.sh script for the node feature uses npm to install pnpm (Line 231: npm install -g pnpm).
Because npm does not pickup the proxy environmentals http_proxy, https_proxy and no_proxy (which are automatically propagated by docker when present in the ~/.docker/config.json configuration as httpProxy, httpsProxy and noProxy) by itself, the script will always fail behind a proxy.
This is a bug in the install script because this is a special situation not automatically handled by Visual Studio Code or Docker but which must be taken care of by the calling script.

Could you please fix this as follows (bash-compatible)?

[ ! -z "$http_proxy" ] && npm set proxy="$http_proxy"
[ ! -z "$https_proxy" ] && npm set https-proxy="$https_proxy"
[ ! -z "$no_proxy" ] && npm set noproxy="$no_proxy"
npm install -g pnpm
@bamurtaugh
Copy link
Member

@samruddhikhandale I'd love to get your thoughts on this one!

@samruddhikhandale
Copy link
Member

The request makes sense to me. Wondering, @jmedelmann would you be interested in contributing a PR with this change? We'd really appreciate it, thanks!

We could use #451 as reference, which adds a new "httpProxy" Feature option for the Terraform Feature. It uses the proxy which is either set by the Feature option or if one exists in the env variables.

@samruddhikhandale
Copy link
Member

Closing as completed with #712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants
@jmedelmann @samruddhikhandale @bamurtaugh and others