mirror of
https://github.com/restic/restic.git
synced 2024-12-24 08:44:52 +00:00
Travis: don't use GOPATH for Go >= 1.11
This commit is contained in:
parent
e4cdb0eab3
commit
a5a46e4989
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue