Skip to content

Commit

Permalink
Use proxy value from settings. Resolves coreybutler#670.
Browse files Browse the repository at this point in the history
  • Loading branch information
coreybutler committed Dec 8, 2021
1 parent 5751e53 commit c8f25ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/nvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}
Expand Down

0 comments on commit c8f25ce

Please sign in to comment.