Skip to content

Commit 55bf1ef

Browse files
authored
fix: use uv tool run for pre-commit if not global (#300)
Issue found here: canonical/craft-store#241 (review)
1 parent 45ab05b commit 55bf1ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

common.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ setup-docs: install-uv ##- Set up a documentation-only environment
6262
.PHONY: setup-precommit
6363
setup-precommit: install-uv ##- Set up pre-commit hooks in this repository.
6464
ifeq ($(shell which pre-commit),)
65-
uv tool install pre-commit
66-
endif
65+
uv tool run pre-commit install
66+
else
6767
pre-commit install
68+
endif
6869

6970
.PHONY: clean
7071
clean: ## Clean up the development environment

0 commit comments

Comments
 (0)