pub fn run_hook_install(path: &Path, yes: bool) -> Result<i32>Expand description
Install the timebomb pre-commit hook.
- If the hook already contains the timebomb block, prints a message and exits 0.
- If the hook file does not exist, creates it with a shebang + hook block.
- If the hook file exists but has no timebomb block, appends the block.
- When
yesis false the user is prompted before any write.