Travis: don't use GOPATH for Go >= 1.11

This commit is contained in:
Alexander Neumann 2018-08-30 23:12:15 +02:00
parent e4cdb0eab3
commit a5a46e4989
1 changed files with 3 additions and 1 deletions

View File

@ -314,7 +314,6 @@ func (env *TravisEnvironment) RunTests() error {
}
env.env["RESTIC_TEST_DISALLOW_SKIP"] = strings.Join(ensureTests, ",")
env.env["GOPROXY"] = "off"
if *runCrossCompile {
// compile for all target architectures with tags
@ -335,6 +334,9 @@ func (env *TravisEnvironment) RunTests() error {
msg("Detected Go version %v\n", v)
if v.AtLeast(GoVersion{1, 11, 0}) {
args = []string{"go", "run", "-mod=vendor", "build.go"}
env.env["GOPROXY"] = "off"
delete(env.env, "GOPATH")
os.Unsetenv("GOPATH")
}
// run the build script