Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c0d3b8e

Browse files
authored
Merge pull request #2161 from schmir/use-go-install
Use 'go install' instead of 'go get'
2 parents 097f2c8 + 379db4c commit c0d3b8e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

pre_commit/languages/golang.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,11 @@ def install_environment(
7979
gopath = directory
8080
env = dict(os.environ, GOPATH=gopath)
8181
env.pop('GOBIN', None)
82-
cmd_output_b('go', 'get', './...', cwd=repo_src_dir, env=env)
82+
cmd_output_b('go', 'install', './...', cwd=repo_src_dir, env=env)
8383
for dependency in additional_dependencies:
84-
cmd_output_b('go', 'get', dependency, cwd=repo_src_dir, env=env)
84+
cmd_output_b(
85+
'go', 'install', dependency, cwd=repo_src_dir, env=env,
86+
)
8587
# Same some disk space, we don't need these after installation
8688
rmtree(prefix.path(directory, 'src'))
8789
pkgdir = prefix.path(directory, 'pkg')

0 commit comments

Comments
 (0)