-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Description
TL;DR
The hook script includes markdown code block markers (
```) that are being passed directly to the shell instead of being stripped. The shell tries to execute```! if [[ ...as a command, causing a parse error.
Error Message
Error: Bash command failed for pattern "```! if [[ -f .claude/ralph-loop.local.md ]]; then
ITERATION=$(grep '^iteration:' .claude/ralph-loop.local.md | sed 's/iteration: *//')
echo "FOUND_LOOP=true"
echo "ITERATION=$ITERATION"
else
echo "FOUND_LOOP=false"
fi
(eval):1: parse error near `echo'
Steps to Reproduce
- Use macOS (which defaults to zsh)
- Run a ralph-loop until it completes or is cancelled
- Observe the parse error in the output
Expected Behavior
The hook script should execute successfully regardless of the user's default shell.
Actual Behavior
The script fails with (eval):1: parse error near 'echo' — a classic zsh error when encountering bash-specific syntax.
Suggested Fix
Either:
- Add an explicit shebang (
#!/bin/bash) to ensure the script runs in bash - Or rewrite the script to be POSIX-compliant / zsh-compatible
Environment
| Component | Details |
|---|---|
| Interface | Claude Code for VS Code extension |
| Plugin | ralph-wiggum (via /plugin install ralph-wiggum@claude-code-plugins) |
| OS | macOS (zsh is default shell since Catalina) |
| Shell | zsh 5.9 (or similar) |
Metadata
Metadata
Assignees
Labels
No labels
