Skip to main content

load_hooks

Function load_hooks 

Source
pub fn load_hooks(repo_root: &Path) -> Result<HooksConfig>
Expand description

Read the hooks key out of the same layered config files (config::load reads): defaults, then the global file, then the project file, later layers winning key-wise. Files without a hooks key are skipped; a present-but-invalid hooks value is a config error naming the layer. Absent everywhere ⇒ HooksConfig::default (no secret ⇒ the caller refuses closed).