bazel: use hermetic go in PATH for golangci-lint

This commit is contained in:
Malte Poll 2023-05-17 17:28:27 +02:00 committed by Malte Poll
parent 66ff0b0b78
commit 4bffeefd70

View File

@ -42,7 +42,7 @@ statuscode=0
echo "Linting the following Go modules with golangci-lint:"
for mod in "${modules[@]}"; do
echo " ${mod}"
GOROOT=$(${go} env GOROOT) ${golangcilint} run --timeout=15m "${mod}/..." || statuscode=$?
PATH="$(dirname "${go}"):${PATH}" GOROOT=$(${go} env GOROOT) GOPATH=$(${go} env GOPATH) GOCACHE=$(${go} env GOCACHE) ${golangcilint} run --timeout=15m "${mod}/..." || statuscode=$?
done
exit "${statuscode}"