Skip to content

Commit 5a6df46

Browse files
authored
fix: skip pre-commit hook install with running during release (#2986)
# Rationale for this change `make install` fails on release tarballs because `install-hooks` requires a .git directory. So this pr modifies install so we only run prek install when .git exists, otherwise succeed. Found during 0.11.0 RC1 release verification. ## Are these changes tested? Yes ## Are there any user-facing changes? No
1 parent 78615d2 commit 5a6df46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ setup-venv: ## Create virtual environment
7272
install-dependencies: setup-venv ## Install all dependencies including extras
7373
uv sync $(PYTHON_ARG) --all-extras --reinstall
7474

75-
install-hooks: ## Install pre-commit hooks
76-
uv run $(PYTHON_ARG) prek install
75+
install-hooks: ## Install pre-commit hooks (skipped outside git repo, e.g. release tarballs)
76+
@if [ -d .git ]; then uv run $(PYTHON_ARG) prek install; fi
7777

7878
install: install-uv install-dependencies install-hooks ## Install uv, dependencies, and pre-commit hooks
7979

0 commit comments

Comments
 (0)