Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 'go install' instead of 'go get' #2161

Merged
merged 1 commit into from Dec 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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