From c8f25ce17ff4947c23169c8c78a9c1a3a7c729ad Mon Sep 17 00:00:00 2001 From: coreybutler Date: Wed, 8 Dec 2021 15:04:09 -0600 Subject: [PATCH] Use proxy value from settings. Resolves #670. --- src/nvm.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nvm.go b/src/nvm.go index d56cd713..5f536f57 100644 --- a/src/nvm.go +++ b/src/nvm.go @@ -915,14 +915,16 @@ func setup() { if val, ok := m["npm_mirror"]; ok { env.npm_mirror = val } + if val, ok := m["proxy"]; ok { if val != "none" && val != "" { if strings.ToLower(val[0:4]) != "http" { val = "http://" + val } res, err := url.Parse(val) - if err != nil { + if err == nil { web.SetProxy(res.String(), env.verifyssl) + env.proxy = res.String() } } }