Explicitly set GO111MODULE to auto

This commit is contained in:
Sauyon Lee
2021-02-25 08:22:06 -08:00
parent e1402b3881
commit be14df042d

View File

@@ -281,6 +281,9 @@ func main() {
depMode := GoGetNoModules
modMode := ModUnset
needGopath := true
if _, present := os.LookupEnv("GO111MODULE"); !present {
os.Setenv("GO111MODULE", "auto")
}
if util.FileExists("go.mod") {
depMode = GoGetWithModules
needGopath = false