use anyhow::Result;
use colored::Colorize;
use crate::hook;
pub fn execute_hook_install() -> Result<()> {
let path = hook::install_hook()?;
println!(
"{} Installed pre-commit hook to {}",
"✅".green().bold(),
path
);
println!(
"{}",
" The hook will run `cora review --staged --format compact` before each commit.".dimmed()
);
println!("{}", " Use `cora hook uninstall` to remove.".dimmed());
Ok(())
}
pub fn execute_hook_uninstall() -> Result<()> {
hook::uninstall_hook()?;
println!("{} Pre-commit hook removed.", "✅".green().bold());
Ok(())
}