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")