Skip to content

Commit

Permalink
Fix cookiecutter post_gen_project.py
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianWilhelm committed Aug 10, 2024
1 parent 62388f9 commit b55574f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
args: ['--unsafe'] # needed for !! tags in mkdocs.yml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
args: ['--fix=auto'] # replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows
2 changes: 1 addition & 1 deletion hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
subprocess.call(['git', 'init'])
subprocess.call(['git', 'add', '*'])
subprocess.call(['git', 'commit', '-m', 'Initial commit'])
subprocess.call(['git', 'remote', 'add', 'origin', '{{ project_repo }}'])
subprocess.call(['git', 'remote', 'add', 'origin', '{{ cookiecutter.project_repo }}'])
except Exception as e:
print(f"An error occurred during initializing the git repo: {e}")
print("Makre sure to manually set up a git repository which is necessary for `hatch-vcs`")

0 comments on commit b55574f

Please sign in to comment.