Skip to content

Commit

Permalink
Allow pre-commit to use all git features it needs
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Sep 26, 2024
1 parent 5048394 commit 53d57d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ jobs:
source /root/pre-commit-venv/bin/activate
pip install pre-commit
export PYTHONPATH=$VIRTUAL_ENV/lib/python3.$(python3 -c 'import sys; print(f"{sys.version_info[1]}")')/site-packages:$PYTHONPATH
# Newer versions of git are more cautious around the github runner
# environment and without this git rev-parse --show-cdup in pre-commit
# fails
git config --global --add safe.directory $(pwd)
pre-commit run --show-diff-on-failure \
--color=always \
--all-files

0 comments on commit 53d57d9

Please sign in to comment.