fix(goctl): GOPROXY env should set by ourself (#4087)

This commit is contained in:
jaron
2024-04-18 22:50:30 +08:00
committed by GitHub
parent e1f15efb3b
commit 1b9b61f505

View File

@@ -8,7 +8,7 @@ import (
func Install(git string) error {
cmd := exec.Command("go", "install", git)
env := os.Environ()
env = append(env, "GO111MODULE=on", "GOPROXY=https://goproxy.cn,direct")
env = append(env, "GO111MODULE=on")
cmd.Env = env
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr