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:
parent
f886c7e59d
commit
2a919c8851
@ -17,6 +17,10 @@ class Rclone(Package):
|
|||||||
|
|
||||||
depends_on("go", type='build')
|
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):
|
def install(self, spec, prefix):
|
||||||
go('build')
|
go('build')
|
||||||
mkdirp(prefix.bin)
|
mkdirp(prefix.bin)
|
||||||
|
Loading…
Reference in New Issue
Block a user