Skip to main content

run_commit_hook_checked

Function run_commit_hook_checked 

Source
pub fn run_commit_hook_checked(
    repo: &Repository,
    hook_name: &str,
    args: &[&str],
    stdin_data: Option<&[u8]>,
    commit_env: &CommitHookEnv<'_>,
) -> Result<(), HookError>
Expand description

Like run_commit_hook but a hook that exits non-zero is an error.

§Errors

HookError::Failed with the hook’s exit status and captured output, or any error from run_commit_hook.