mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Remove unnecessary files after installation
This commit is contained in:
parent
84ba1fd0c2
commit
51d673dff5
2 changed files with 9 additions and 7 deletions
|
|
@ -9,6 +9,7 @@ from pre_commit.envcontext import Var
|
|||
from pre_commit.languages import helpers
|
||||
from pre_commit.util import clean_path_on_failure
|
||||
from pre_commit.util import cmd_output
|
||||
from pre_commit.util import rmtree
|
||||
from pre_commit.xargs import xargs
|
||||
|
||||
|
||||
|
|
@ -66,6 +67,9 @@ def install_environment(
|
|||
cmd_output('go', 'get', './...', cwd=repo_src_dir, env=env)
|
||||
for dependency in additional_dependencies:
|
||||
cmd_output('go', 'get', dependency, cwd=repo_src_dir, env=env)
|
||||
# Same some disk space, we don't need these after installation
|
||||
rmtree(repo_cmd_runner.path(directory, 'src'))
|
||||
rmtree(repo_cmd_runner.path(directory, 'pkg'))
|
||||
|
||||
|
||||
def run_hook(repo_cmd_runner, hook, file_args):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue