diff --git a/build.rs b/build.rs index a26f4e9..42cf34d 100644 --- a/build.rs +++ b/build.rs @@ -8,6 +8,9 @@ fn main() -> Result<()> { // Copy hooks to appropriate location so that git will run them. // In git worktrees, .git is a symlink and the following commands fail. if Path::new(".git").is_dir() { + if !Path::new("./.git/hooks").exists() { + std::fs::create_dir_all("./.git/hooks")?; + } std::fs::copy("./scripts/pre-commit", "./.git/hooks/pre-commit")?; std::fs::copy("./scripts/pre-push", "./.git/hooks/pre-push")?; } diff --git a/src/scheduler.rs b/src/scheduler.rs index 2e515c3..b5469d9 100644 --- a/src/scheduler.rs +++ b/src/scheduler.rs @@ -386,6 +386,7 @@ pub struct Analyzer { } #[derive(Debug, Clone)] +#[allow(dead_code)] pub struct Schedule { #[allow(unused)] pub scopes: BTreeMap, Scope>,