Skip to content

Commit b1a881e

Browse files
committed
Use run_go_tool to execute govulncheck
Signed-off-by: Ivan Valdes <[email protected]>
1 parent 15e8b41 commit b1a881e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,6 @@ endif
194194

195195
.PHONY: run-govulncheck
196196
run-govulncheck:
197-
ifeq (, $(shell command -v govulncheck))
198-
$(shell go install golang.org/x/vuln/cmd/govulncheck@latest)
199-
endif
200197
PASSES="govuln" ./scripts/test.sh
201198

202199
# Tools

scripts/test.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,9 @@ function markdown_marker_pass {
398398
}
399399

400400
function govuln_pass {
401-
run_for_modules run govulncheck -show verbose
401+
local version
402+
version=$(cd tools/mod && go list -m -f '{{.Version}}' golang.org/x/vuln)
403+
run_for_modules run_go_tool "golang.org/x/vuln/cmd/govulncheck@${version}" -show verbose
402404
}
403405

404406
function govet_pass {

0 commit comments

Comments
 (0)