cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] npm config list should show HTTP_PROXY/HTTPS_PROXY/NOPROXY

Open deepy opened this issue 4 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

This issue exists in the latest npm version

  • [X] I am using the latest npm

Current Behavior

npm config list shows all proxy settings except environment variables like HTTP_PROXY, NOPROXY, etc

Expected Behavior

Setting HTTP_PROXY, HTTPS_PROXY or NOPROXY will affect how run npm runs, having these show in npm config list will help users actually see what settings their environment has and prevent easy mistakes.

The expected behaviour would be that an empty npm config list shouldn't use any proxies, or rather, all proxy settings used by npm should be listed.

Steps To Reproduce

No response

Environment

No response

deepy avatar Dec 14 '21 11:12 deepy

I've created PR #8828 to address this issue.

npm config list will now display proxy-related environment variables (HTTP_PROXY, HTTPS_PROXY, NO_PROXY and their lowercase equivalents) when they are set. The variables appear in a new ; environment-related config section.

Example output with proxy environment variables set:

; environment-related config

; HTTP_PROXY = "http://proxy.example.com:8080"
; HTTPS_PROXY = "https://secure-proxy.example.com:8443"  
; NO_PROXY = "localhost,127.0.0.1"

This makes it easier for users to see what proxy settings are being used by npm.

MaxBlack-dev avatar Dec 04 '25 19:12 MaxBlack-dev