Ensure GOPATH is always controlled by pants.

Review Request #2933 - Created Oct. 6, 2015 and submitted

Information
John Sirois
pants
jsirois/issues/2321
2321, 2323
dd98fb3...
Reviewers
pants-reviews
gmalmquist, kwlzn, mateor
Previously, commands that did not require a GOPATH allowed any GOPATH
set in the user's environment to leak through.  This could lead to
spurious failures when the GOPATH was invalid.  Fix GoDistribution to
instead forcibly nullify GOPATH when the go command does not set one.

 contrib/go/src/python/pants/contrib/go/subsystems/go_distribution.py             |  6 +++---
 contrib/go/tests/python/pants_test/contrib/go/subsystems/BUILD                   |  1 +
 contrib/go/tests/python/pants_test/contrib/go/subsystems/test_go_distribution.py | 22 +++++++++++++++++-----
 3 files changed, 21 insertions(+), 8 deletions(-)

Got test_go_command_no_gopath_overrides_user_gopath_issue2321 failing
before the fix, then passing.

CI went green here:
https://travis-ci.org/pantsbuild/pants/builds/83940764

Nick Howard (Twitter)
John Sirois
Mateo Rodriguez
John Sirois
John Sirois
Review request changed

Status: Closed (submitted)

Loading...