fix(deploy): fix bugs in pre-commit

This commit is contained in:
Gene 2023-11-05 16:47:24 +08:00
parent f80c07ded2
commit 322e09c9a4
1 changed files with 3 additions and 1 deletions

View File

@ -11,7 +11,9 @@ if git diff --name-only --cached | grep -q "\.py$"; then
if [ -n "$python_files" ]; then
black -l 120 $python_files
for file in $cached_python_files; do
git add $file
if [ -f "$file" ]; then
git add $file
fi
done
fi
else