1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-25 01:06:39 +00:00

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

View file

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