diff --git a/.github/workflows/sync-template.yml b/.github/workflows/sync-template.yml index 9398278..a5c48e8 100644 --- a/.github/workflows/sync-template.yml +++ b/.github/workflows/sync-template.yml @@ -22,6 +22,9 @@ jobs: with: path: cookiecutter-repository + - name: Install pre-commit + run: pip install pre-commit + - name: Install cookiecutter run: pip install cookiecutter diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index ebe91e2..1231012 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -24,12 +24,12 @@ def __enter__(self): def __exit__(self, exc_type, exc_val, exc_tb): # Finalize by making an initial git commit - subprocess.check_call("git add *".split()) + subprocess.check_call(["git", "add", "-A"]) # Maybe run pre-commit if {{ have_precommit }}: subprocess.call("pre-commit run -a".split()) - subprocess.check_call("git add *".split()) + subprocess.check_call(["git", "add", "-A"]) subprocess.check_call(["git", "commit", "-m", "Initial Commit"]) subprocess.check_call(["git", "tag", "v0.0.1"])