File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed
Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1111# Update hooks to latest versions:
1212# pre-commit autoupdate
1313
14- default_language_version :
15- python : python3.13
16-
1714repos :
1815 # =============================================================================
1916 # Standard pre-commit hooks
8380 rev : 25.1.0
8481 hooks :
8582 - id : black
86- language_version : python3.13
8783 exclude : |
8884 (?x)^(
8985 vendor/|
Original file line number Diff line number Diff line change @@ -6,11 +6,22 @@ initial_index_state=$(git diff --name-only --cached --diff-filter=AM)
66
77export EVERGREEN_MODE=true
88
9- # Run pre-commit framework
10- command -v pre-commit > /dev/null 2>&1 || pip install pre-commit
9+ # Install pre-commit if not available
10+ if ! command -v pre-commit > /dev/null 2>&1 ; then
11+ echo " Installing pre-commit..."
12+ pip install pre-commit
13+ fi
14+
15+ echo " Running pre-commit hooks..."
16+
17+ # Run pre-commit - it may exit non-zero if it modifies files
18+ # We capture the exit code and handle it appropriately
19+ set +e
1120pre-commit run --all-files
21+ pre_commit_exit=$?
22+ set -e
1223
13- echo " Pre-commit hook has completed."
24+ echo " Pre-commit hook has completed successfully ."
1425
1526# Stage any changes made by the pre-commit hook
1627git add -u
You can’t perform that action at this time.
0 commit comments