Skip to main content

run_hooks

Function run_hooks 

Source
pub fn run_hooks(
    hooks: &[HookCfg],
    trigger: HookWhen,
    dir: &Path,
) -> Result<(), HookError>
Expand description

Run every hook in hooks whose when matches trigger and whose os (if set) matches std::env::consts::OS, in declaration order, with the child process’s cwd set to dir (the app directory). A hook whose declared outputs are all at least as new as its declared inputs is skipped; see [is_stale_free]. A hook that exits non-zero aborts the run immediately - later hooks do not run.