Skip to main content

write_hook_dispatch

Function write_hook_dispatch 

Source
pub fn write_hook_dispatch(
    hooks_directory: &Path,
    plan: &HookDispatchPlan,
    executable: &Path,
) -> Result<(), HookEntryError>
Expand description

What: Create a new hooks directory holding the plan and one entry per preparation event. Why: The incumbent’s writeHookShim, with native entries instead of a Node program: post-commit has no entry, so it never runs during preparation. The directory must not exist, so nothing half-written is reused.

In TS you’d write (pseudocode):

await writeHookShim({ hooksDirectory, plan, nodePath });