Failed to run travis_setup_go

sudo: false
dist: trusty

language: go

  - linux
  - osx

  - "1.11.x"
  - "1.12.x"

install: true

    - GO111MODULE=on
    - GOFLAGS='-mod vendor'

  - curl -sfL | sh -s v1.17.1

  - golangci-lint run
  - go test -race -coverprofile=coverage.txt -covermode=atomic ./...

  - bash <(curl -s

$ travis_setup_go

I don’t have any idea what to do with ‘1.12.6’.

(using download type ‘auto’)

Failed to run gimme

The command “travis_setup_go” failed and exited with 86 during .

Full log:

1 Like

Same here:

$ travis_setup_go
I don't have any idea what to do with '1.12.7'.
  (using download type 'auto')
Failed to run gimme
The command "travis_setup_go" failed and exited with 86 during .

any solution?

Do you have a recent failure?

Most likely explanation is that gimme resolved to a version, but failed to download the binary file.

The error seems a bit unpredictable; my attempts (with go: stable) just now proceeded to find and install 1.14.2. If you are seeing this issue on a more consistent basis, setting GIMME_DEBUG=1 should yield more info.

The problem is this $GOFLAGS value:

GOFLAGS='-mod vendor'

This causes go version command to fail.

$ docker run --rm -it golang:alpine /bin/sh
Unable to find image 'golang:alpine' locally
alpine: Pulling from library/golang
cbdbe7a5bc2a: Pull complete
408f87550127: Pull complete
fe522b08c979: Pull complete
618fff1cf170: Pull complete
0d8b518583db: Pull complete
Digest: sha256:9b3ad7928626126b72b916609ad081cfb6c0149f6e60cef7fc1e9e15a0d1e973
Status: Downloaded newer image for golang:alpine
/go # go version
go version go1.14.2 linux/amd64
/go # GOFLAGS="-mod vendor" go version
go: parsing $GOFLAGS: non-flag "vendor"
/go # echo $?

As you can see, this happens on the official Go Docker image and should ideally be handled by the Go team.

In the meantime, I’ve opened

which should get you past the install step. (Our build script should call go version subsequently, which would still fail.)

Actually, I think your value is wrong. According to

	A space-separated list of -flag=value settings to apply
	to go commands by default, when the given flag is known by
	the current command. Each entry must be a standalone flag.
	Because the entries are space-separated, flag values must
	not contain spaces. Flags listed on the command line
	are applied after this list and therefore override it.

You should rewrite it as GOFLAGS="-mod=vendor".