Skip to content

validate-config silently skips validation when pyyaml unavailable #234

@philoserf

Description

@philoserf

Location

  • hooks/validate-config.py:4,14,159-162

Description

The script declares dependencies = ["pyyaml>=6.0"] via PEP 723 metadata, but Claude Code runs hooks as plain python3, which doesn't resolve PEP 723 deps. If pyyaml isn't installed system-wide, import yaml (line 14) raises ImportError, caught by the bare except on line 159, and the hook exits 0 — silently skipping all validation.

Suggested Fix

Either ensure pyyaml is in the system Python environment, rewrite to use a stdlib-only YAML parser for frontmatter, or switch the hook to run via uvx --script.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions