mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge pull request #2161 from schmir/use-go-install
Use 'go install' instead of 'go get'
This commit is contained in:
commit
c0d3b8e7d0
1 changed files with 4 additions and 2 deletions
|
|
@ -79,9 +79,11 @@ def install_environment(
|
||||||
gopath = directory
|
gopath = directory
|
||||||
env = dict(os.environ, GOPATH=gopath)
|
env = dict(os.environ, GOPATH=gopath)
|
||||||
env.pop('GOBIN', None)
|
env.pop('GOBIN', None)
|
||||||
cmd_output_b('go', 'get', './...', cwd=repo_src_dir, env=env)
|
cmd_output_b('go', 'install', './...', cwd=repo_src_dir, env=env)
|
||||||
for dependency in additional_dependencies:
|
for dependency in additional_dependencies:
|
||||||
cmd_output_b('go', 'get', dependency, cwd=repo_src_dir, env=env)
|
cmd_output_b(
|
||||||
|
'go', 'install', dependency, cwd=repo_src_dir, env=env,
|
||||||
|
)
|
||||||
# Same some disk space, we don't need these after installation
|
# Same some disk space, we don't need these after installation
|
||||||
rmtree(prefix.path(directory, 'src'))
|
rmtree(prefix.path(directory, 'src'))
|
||||||
pkgdir = prefix.path(directory, 'pkg')
|
pkgdir = prefix.path(directory, 'pkg')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue