Skip to content

Commit

Permalink
Fix usage of $GOPATH in Makefile (#1379)
Browse files Browse the repository at this point in the history
The command `make build` fails when `$GOPATH` contains multiple paths separated by `:`:

Example:

```
$ echo $GOPATH
/go:/opt/rh/go-toolset/root/usr/share/gocode

$ make build
Makefile:99: *** target pattern contains no `%'.  Stop.
  • Loading branch information
paulfantom authored and bwplotka committed Aug 7, 2019
1 parent 04e5e7d commit 32a412a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ DOCKER_IMAGE_NAME ?= thanos
DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD))-$(shell date +%Y-%m-%d)-$(shell git rev-parse --short HEAD)

TMP_GOPATH ?= /tmp/thanos-go
GOBIN ?= ${GOPATH}/bin
GOBIN ?= $(firstword $(subst :, ,$GOPATH))/bin
GO111MODULE ?= on
export GO111MODULE
GOPROXY ?= https://proxy.golang.org
Expand Down

0 comments on commit 32a412a

Please sign in to comment.