Skip to content

fix: Wrap pre-commit files regex in shell command#11

Merged
alecthomas merged 1 commit intomainfrom
aat/fix-pre-commit-files-regex
Mar 17, 2026
Merged

fix: Wrap pre-commit files regex in shell command#11
alecthomas merged 1 commit intomainfrom
aat/fix-pre-commit-files-regex

Conversation

@alecthomas
Copy link
Copy Markdown
Collaborator

@alecthomas alecthomas commented Mar 17, 2026

Lefthook's files field is a shell command, not a regex pattern.
The pre-commit adapter was passing the regex directly, causing
sh -c syntax errors on patterns with special characters like
parentheses and pipes.

Lefthook's `files` field is a shell command, not a regex pattern.
The pre-commit adapter was passing the regex directly, causing
`sh -c` syntax errors on patterns with special characters like
parentheses and pipes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
Ai-assisted: true
@alecthomas alecthomas enabled auto-merge (squash) March 17, 2026 05:07
@alecthomas alecthomas merged commit 145820c into main Mar 17, 2026
6 checks passed
@alecthomas alecthomas deleted the aat/fix-pre-commit-files-regex branch March 17, 2026 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant