fix(makefile):fix the per-commit hooks installation (#3569)
Some checks failed
Unit Tests / backend-unit-tests (push) Waiting to run
Frontend Unit Tests / frontend-unit-tests (push) Waiting to run
Lint Check / lint-backend (push) Waiting to run
Lint Check / lint-frontend (push) Waiting to run
Replay E2E (front-back contract) / Layer 1 — backend golden (no API key) (push) Waiting to run
Replay E2E (front-back contract) / Layer 2 — full-stack render (no API key) (push) Waiting to run
Backend Blocking IO / backend-blocking-io (push) Has been cancelled

Install pre-commit as a stable uv tool. Avoid `uv run --with pre-commit`: that runs
  from a throwaway temp env whose Python gets baked into .git/hooks/pre-commit and is
  gone by the next commit, leaving the hook broken. A tool install bakes a permanent path.
This commit is contained in:
Willem Jiang 2026-06-14 11:56:38 +08:00 committed by GitHub
parent 0fb2a75bfb
commit ec520e6427
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -76,7 +76,8 @@ install:
@echo "Installing frontend dependencies..."
@cd frontend && pnpm install
@echo "Installing pre-commit hooks..."
@$(BACKEND_UV_RUN) --with pre-commit pre-commit install
@uv tool install pre-commit
@pre-commit install --overwrite
@echo "✓ All dependencies installed"
@echo ""
@echo "=========================================="