Skip to content

Commit 449077f

Browse files
committedApr 20, 2021
Makefile: build and test using --mod=readonly
This keeps `go test` from getting upset if there is a `vendor` directory with a vendored Go toolchain in it.
1 parent 811c2ac commit 449077f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export GO111MODULES
55
GO := $(CURDIR)/script/go
66

77
GO_LDFLAGS := -X main.BuildVersion=$(shell git describe --tags --always --dirty || echo unknown)
8-
GOFLAGS := -ldflags "$(GO_LDFLAGS)"
8+
GOFLAGS := -mod=readonly -ldflags "$(GO_LDFLAGS)"
99

1010
ifdef USE_ISATTY
1111
GOFLAGS := $(GOFLAGS) --tags isatty

0 commit comments

Comments
 (0)
Please sign in to comment.