Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
24391: Makefile: further improve GOPATH detection r=RaduBerinde a=benesch Squash of #24387. Closes #24387. --- It is necessary to use `realpath` to get the real GOPATH, as symlinks may be in play. For instance, on FreeBSD `/home` is symlinked to `/usr/home/`, but the former is often used. If `realpath` isn't used, the string-based prefix matching will incorrectly claim that CWD is not a child of GOPATH. Additionally, if `go env GOPATH` does not return a workable value, that means there is something wrong with the golang deployment and it is unsafe to assume the value of GOPATH and attempt to proceed. Error out with a message about GOPATH resolution if `go env GOPATH` does not come back with a good value. Release note (build change): None
- Loading branch information