Skip to main content

dispatch

Function dispatch 

Source
pub fn dispatch(
    scripts: &Scripts,
    event: &str,
    ctx: &ScriptContext<'_>,
) -> Result<Vec<EntryOutcome>>
Expand description

Dispatch a named event, running its entries in order. Returns one outcome per entry (recursing into aliases inline). A non-zero process exit or an alias cycle is an Err that aborts the event and the surrounding command.

@putenv mutations are scoped to this dispatch; the inherited process env is untouched. Output streams straight to the user’s stdout/stderr — scripts are chatty and the user opted into running them.