diff options
author | bogushevich <boga1@mail.ru> | 2012-08-20 06:14:48 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-08-20 08:20:07 +0400 |
commit | 586edf01273147bd9c3a5dc448f3636e8a8cb93c (patch) | |
tree | 9f5b62a62322a2c88355d33825ed8b34326db70b | |
parent | 6aa633e412fb3713430610b90089692850bbdd56 (diff) |
Set https-proxy to http by default
-rw-r--r-- | lib/utils/fetch.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/utils/fetch.js b/lib/utils/fetch.js index 6042abc52..b98852066 100644 --- a/lib/utils/fetch.js +++ b/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 |