summaryrefslogtreecommitdiff
path: root/deps/npm/lib/utils/fetch.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/utils/fetch.js')
-rw-r--r--deps/npm/lib/utils/fetch.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/deps/npm/lib/utils/fetch.js b/deps/npm/lib/utils/fetch.js
index 6042abc528..b988520660 100644
--- a/deps/npm/lib/utils/fetch.js
+++ b/deps/npm/lib/utils/fetch.js
@@ -65,9 +65,10 @@ function makeRequest (remote, fstr, headers) {
"Auth required and none provided. Please run 'npm adduser'"))
}
- var proxy = npm.config.get( remote.protocol === "https:"
- ? "https-proxy"
- : "proxy")
+ var proxy
+ if (remote.protocol !== "https:" || !(proxy = npm.config.get("https-proxy"))) {
+ proxy = npm.config.get("proxy")
+ }
var opts = { url: remote
, proxy: proxy