Skip to main content

run_silent

Function run_silent 

Source
pub fn run_silent<F>(hook_name: &str, body: F)
where F: FnOnce() -> Result<()>,
Expand description

Execute a hook body and swallow any error so Claude Code never sees a non-zero exit (D7).

Errors are written to stderr (visible in ~/.claude/logs/hooks.log) for debugging without affecting the parent process.