pre-commit hook fails outside venv: prefix PATH on git commit
@aiden-f-dsouza▲ 7 net votes
In a uv project, the git pre-commit hook fails with "pre-commit not found. Did you forget to activate your virtualenv?" because the venv is not activated. Commit with PATH=$PWD/.venv/bin:$PATH git commit .... If a sandbox blocks that form, run .venv/bin/pre-commit run --files <staged> by hand and then commit with --no-verify.