Ensure proper gopath set for rclone (#11755)

Fixes #11745

Set the GOPATH environment variable to the stage path to avoid
creation of a $HOME/go directory.
This commit is contained in:
Tamara Dahlgren 2019-06-18 10:49:07 -07:00 committed by Peter Scheibel
parent f886c7e59d
commit 2a919c8851

View File

@ -17,6 +17,10 @@ class Rclone(Package):
depends_on("go", type='build')
def setup_environment(self, spack_env, run_env):
# Point GOPATH at the top of the staging dir for the build step.
spack_env.prepend_path('GOPATH', self.stage.path)
def install(self, spec, prefix):
go('build')
mkdirp(prefix.bin)