Add GOPATH to PATH in find-lint.sh.

The user doesn't necessarily have it in PATH.
This commit is contained in:
Tommie Gannert 2021-09-26 15:29:19 +02:00
parent f9bac2f78a
commit 8e085b1164

View file

@ -33,7 +33,7 @@ echo "Looking for lint..."
# Capture exit code to ensure go.{mod,sum} is restored before exiting
exit_code=0
golangci-lint run $args || exit_code=1
PATH="$PATH:${GOPATH:-~/go}/bin" golangci-lint run $args || exit_code=1
# Restore go.{mod,sum}
mv go.mod.bak go.mod && mv go.sum.bak go.sum