Skip to content

Commit

Permalink
Merge 2b2ec3b into 05590a5
Browse files Browse the repository at this point in the history
  • Loading branch information
ilaner committed Mar 31, 2024
2 parents 05590a5 + 2b2ec3b commit 9d08472
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .changelog/4196.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Fixed an issue in **pre-commit** when using `--all-files` it crashed with memory error.
type: fix
pr_number: 4196
3 changes: 2 additions & 1 deletion demisto_sdk/commands/pre_commit/pre_commit_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ def run(
logger.info(f"[yellow]Running hook {pre_commit_context.run_hook}[/yellow]")

write_dict(PRECOMMIT_CONFIG_MAIN_PATH, pre_commit_context.precommit_template)

# we don't need the context anymore, we can clear it to free up memory for the pre-commit checks
del pre_commit_context
# install dependencies of all hooks in advance
PreCommitRunner._run_pre_commit_process(
PRECOMMIT_CONFIG_MAIN_PATH,
Expand Down

0 comments on commit 9d08472

Please sign in to comment.