pub fn run_hook(
hook: &HookConfig,
source: &Utf8Path,
yui: &YuiVars,
vars: &Table,
engine: &mut Engine,
base_ctx: &Context,
state: &mut State,
dry_run: bool,
force: bool,
) -> Result<HookOutcome>Expand description
Decide whether to run hook and run it if so. Updates state in
memory on a successful run — caller is responsible for persisting
(typically via state.save(source) after each Ran outcome, so a
later hook failure doesn’t lose the record of the earlier success).
force = true bypasses the when_run state check (still respects
when — an explicit yui hooks run <name> shouldn’t suddenly run a
hook that’s when = "yui.os == 'macos'" on Linux).