From 13186d84ac8dc2a920650672cb73eade7dfdab88 Mon Sep 17 00:00:00 2001 From: ilan Date: Tue, 30 Jan 2024 12:41:49 +0200 Subject: [PATCH] fix individual hooks --- demisto_sdk/commands/pre_commit/pre_commit_context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demisto_sdk/commands/pre_commit/pre_commit_context.py b/demisto_sdk/commands/pre_commit/pre_commit_context.py index eafc6370e2..972473c9d8 100644 --- a/demisto_sdk/commands/pre_commit/pre_commit_context.py +++ b/demisto_sdk/commands/pre_commit/pre_commit_context.py @@ -125,7 +125,7 @@ def _get_hooks(self, pre_commit_config: dict) -> dict: for hook in repo.get("hooks", []): if not self.run_docker_hooks and hook["id"].endswith("in-docker"): continue - if (self.run_hook and hook["id"] in self.run_hook) or ( + if (self.run_hook and self.run_hook in hook["id"]) or ( not self.run_hook and hook["id"] not in self.skipped_hooks and not get_property(hook, self.mode, "skip")