From a06043902614314106a259b28546bc8882f2c7e4 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 16 Jun 2019 23:46:31 -0400 Subject: [PATCH 5/5] build: unexport GOPATH when module vendoring is used The go compiler doesn't like it when you mix the two, and Travis CI does exactly that. Take advantage of the opportunity to disable it everywhere else as well. --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index c422ef2490bbf85cc2b340330a0666fbff6373bd..679d253946b7ec0048e422d27a16d90b89b32dd2 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,14 @@ FLAGS_ALL = $(shell go version | grep -q 'go1.[89]' || echo 'all=') export MOD_VENDOR_ARG := $(shell go version | grep -q 'go1.1[^0]' && echo '-mod=vendor') export LDFLAGS := -extldflags '$(LDFLAGS)' export GCFLAGS := $(FLAGS_ALL) export ASMFLAGS := $(FLAGS_ALL) +ifneq ($(MOD_VENDOR_ARG),) + unexport GOPATH +endif + MIN_COVERAGE = 89.4 HELP_CMD = \ share/man/man1/hub-alias.1 \ share/man/man1/hub-api.1 \ -- 2.21.0