mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-15 21:40:19 -06:00
Remove unnecessary files after installation
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user