Skip to content

Commit

Permalink
vet: Don't use GOROOT to set PATH if GOROOT is unset (#7761)
Browse files Browse the repository at this point in the history
  • Loading branch information
arjan-bal authored Oct 22, 2024
1 parent 14e2a20 commit c538c31
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/vet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ cleanup() {
}
trap cleanup EXIT

PATH="${HOME}/go/bin:${GOROOT}/bin:${PATH}"
if [ -n "${GOROOT}" ]; then
PATH="${GOROOT}/bin:${PATH}"
fi
PATH="${HOME}/go/bin:${PATH}"
go version

if [[ "$1" = "-install" ]]; then
Expand Down

0 comments on commit c538c31

Please sign in to comment.