Skip to content

Commit 1da1d71

Browse files
authored
support prek in addition to pre-commit (#485)
1 parent ade9907 commit 1da1d71

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

hooks/post_gen_project.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ def skipped_dirs():
3434
run(args=["git", "commit", "--no-verify", "--no-gpg-sign", "-m", msg], check=True)
3535

3636
# Install pre-commit
37-
run(["pre-commit", "install"], check=True)
37+
try:
38+
run(["prek", "install"], check=True)
39+
except FileNotFoundError:
40+
run(["pre-commit", "install"], check=True)
3841

3942
# The following output was generated using rich
4043
# The formatted output is included here directly, because I don't want

0 commit comments

Comments
 (0)