Skip to main content

run_hooks_with

Function run_hooks_with 

Source
pub fn run_hooks_with(
    settings: &Settings,
    event: HookEvent,
    ctx: HookContext,
    spawn: impl FnMut(&Hook, &[(String, String)]),
)
Expand description

Same as run_hooks but delegates spawning to spawn. The callback receives each Hook (already filtered by event and enabled, and already truncated to MAX_HOOKS_PER_EVENT) plus the env vars that would be passed to its child. Used by tests to verify the cap without actually shelling out hundreds of processes.