Skip to content

Commit

Permalink
Update pre_gen_project.py (#164)
Browse files Browse the repository at this point in the history
Bugfix for check for underscores in plugin name. Must use re.search (not re.match) to detect an underscore anywhere in the plugin name string.
  • Loading branch information
GenevieveBuckley committed Sep 22, 2023
1 parent 6e1d851 commit a6c4c70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hooks/pre_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
logger.error(f" More info: {link}")
sys.exit(1)

if re.match(r"_", "{{cookiecutter.plugin_name}}"):
if re.search(r"_", "{{cookiecutter.plugin_name}}"):
logger.error("PyPI.org and pip discourage package names with underscores.")
sys.exit(1)

0 comments on commit a6c4c70

Please sign in to comment.