Skip to content

fix: reject empty hook command when parsing hooks - #12

Merged
desbma merged 1 commit into
desbma:masterfrom
usefulish:pr/reject-empty-command
Jul 15, 2026
Merged

fix: reject empty hook command when parsing hooks#12
desbma merged 1 commit into
desbma:masterfrom
usefulish:pr/reject-empty-command

Conversation

@usefulish

Copy link
Copy Markdown
Contributor

An empty command = "" in hooks.toml parses successfully and then panics (index out of bounds on hook.command[0]) when the hook first runs. Reject it at parse time instead.

Red-green test: reject_empty_command fails on master (the parse succeeds), passes with the fix.

🤖 Generated with Claude Code

An empty command string parsed successfully and then panicked (index
out of bounds) when the hook first ran.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@desbma
desbma merged commit d11b0d8 into desbma:master Jul 15, 2026
5 checks passed
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.

2 participants