hk 1.44.0

A tool for managing git hooks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::{Result, env};

#[derive(Debug, clap::Args)]
pub struct Clear {}

impl Clear {
    pub async fn run(&self) -> Result<()> {
        if env::HK_CACHE_DIR.exists() {
            xx::file::remove_dir_all(&*env::HK_CACHE_DIR)?;
            xx::file::mkdirp(&*env::HK_CACHE_DIR)?;
        }
        Ok(())
    }
}