Skip to main content

run_remove

Function run_remove 

Source
pub fn run_remove() -> Result<()>
Expand description

Handle a Claude Code WorktreeRemove hook event.

Reads the JSON payload from stdin, extracts worktree_path, and runs the configured pre_rm hook in that directory as a best-effort advisory step. Hook failures are logged to stderr but never abort the handler — Claude Code owns the actual removal, and WorktreeRemove hooks cannot block it anyway.

Always exits 0.