Resolve python tools off PATH, not just as importable modules
1.1.0 reported an installed ruff as missing and skipped the lint. Its resolution order ended at `python -m <tool>`, guarded by an `import <tool>` probe, but ruff ships as a standalone Rust binary and is never importable. The probe failed, the check was recorded as skipped, and the gate reported a coverage gap that did not exist. This also regressed 1.0.2, which called a bare `ruff` and let PATH resolve it. Restore that path, ordered after the project venv and uv so a project-local tool still wins, and before `python -m` so a binary is found even when a same-named module is not importable. Verified by injecting an unused import into audit-terraform and confirming the guard blocks with `ruff check .`. The new regression test fails against the 1.1.0 resolution order and passes against this one. Tests: 10 passing (bash-guard), 197 (audit-code), 106 (audit-terraform), ruff clean across both skills.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "guards",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"description": "Personal enforcement hooks: jj-only version control, no Claude attribution, build+test gate on push, and secret scrubbing on file writes.",
|
||||
"author": {
|
||||
"name": "Malcolm Roberts"
|
||||
|
||||
Reference in New Issue
Block a user