mirror of
https://github.com/coreybutler/nvm-windows.git
synced 2026-01-14 07:03:17 +08:00
Use proxy value from settings. Resolves #670.
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user