Skip to content

Commit e9b2781

Browse files
committed
Check go version when installing govulncheck
govulncheck supports only go 1.18 or greater Signed-off-by: Cosmin Cojocar <[email protected]>
1 parent 88c23de commit e9b2781

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ install-test-deps:
2525
$(GO_NOMOD) get -u github.com/lib/pq
2626

2727
install-govulncheck:
28-
go install golang.org/x/vuln/cmd/govulncheck@latest
28+
@if [ $(GO_MINOR_VERSION) -gt $(GOVULN_MIN_VERSION) ]; then \
29+
go install golang.org/x/vuln/cmd/govulncheck@latest; \
30+
fi
2931

3032
test: install-test-deps build fmt lint sec govulncheck
3133
$(GINKGO) -v --fail-fast

0 commit comments

Comments
 (0)