Skip to content

Commit

Permalink
Merge pull request #2161 from schmir/use-go-install
Browse files Browse the repository at this point in the history
Use 'go install' instead of 'go get'
  • Loading branch information
asottile committed Dec 15, 2021
2 parents 097f2c8 + 379db4c commit c0d3b8e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pre_commit/languages/golang.py
Expand Up @@ -79,9 +79,11 @@ def install_environment(
gopath = directory
env = dict(os.environ, GOPATH=gopath)
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:
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
rmtree(prefix.path(directory, 'src'))
pkgdir = prefix.path(directory, 'pkg')
Expand Down

0 comments on commit c0d3b8e

Please sign in to comment.