Skip to content

Commit

Permalink
fixing string parsing on regex
Browse files Browse the repository at this point in the history
  • Loading branch information
dtaivpp committed Jun 30, 2021
1 parent 49e4229 commit 4330523
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commit_msg_regex_hook/commit_msg_regex_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def process_pattern(pattern_str: str) -> Pattern:
"""
try:
print(f"Incoming Pattern: {pattern_str}")
pattern = re.compile(pattern_str)
pattern = re.compile(pattern_str[1:-1])
except Exception as e:
raise argparse.ArgumentTypeError(
f"'{pattern_str}' is not a valid regex pattern\n {e}"
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = commit-msg-regex-hook
version = v0.0.7
version = v0.0.8
author = David Tippett
description = Checks if commit message matches supplied regex
long_description = file: README.md
Expand Down

0 comments on commit 4330523

Please sign in to comment.