Skip to content

Commit

Permalink
tools/customvet: consider $GO environment variable
Browse files Browse the repository at this point in the history
For backports it's usually convenient to be able to set the $GO
environment variable to the version used in the particular stable
branch, e.g. on v1.10 we'd set GO=go1.16.15. However, that setting is
currently not considered in tools/customvet. This can lead to unexpected
failures such as the followin when running `GO=go1.16.15 make precheck`
on v1.10 branch:

    contrib/scripts/custom-vet-check.sh
    main: internal error: package "sync" without types was imported from "github.com/cilium/cilium/pkg/cleanup"
    exit status 1

Signed-off-by: Tobias Klauser <tobias@cilium.io>
  • Loading branch information
tklauser authored and joestringer committed Aug 3, 2022
1 parent cb0b256 commit 920094b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/customvet
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"

go run ${SCRIPTPATH}/../vendor/github.com/cilium/customvet/main.go $@
${GO:-go} run ${SCRIPTPATH}/../vendor/github.com/cilium/customvet/main.go $@

0 comments on commit 920094b

Please sign in to comment.