mirror of
https://github.com/coreybutler/nvm-windows.git
synced 2026-01-31 02:01:43 +08:00
fix: mirror address not end with '/'
This commit is contained in:
@@ -36,12 +36,18 @@ func SetMirrors(node_mirror string, npm_mirror string){
|
||||
if strings.ToLower(nodeBaseAddress[0:4]) != "http" {
|
||||
nodeBaseAddress = "http://"+nodeBaseAddress
|
||||
}
|
||||
if !strings.HasSuffix(nodeBaseAddress, "/") {
|
||||
nodeBaseAddress += "/"
|
||||
}
|
||||
}
|
||||
if npm_mirror != "" && npm_mirror != "none"{
|
||||
npmBaseAddress = npm_mirror;
|
||||
if strings.ToLower(npmBaseAddress[0:4]) != "http" {
|
||||
npmBaseAddress = "http://"+npmBaseAddress
|
||||
}
|
||||
if !strings.HasSuffix(npmBaseAddress, "/") {
|
||||
npmBaseAddress += "/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user