Skip to content

v0.3.3

Choose a tag to compare

@github-actions github-actions released this 14 May 07:17
· 29 commits to main since this release

🐛 Bug Fixes

  • cargo:rerun-if-changed watched wrong directory: The build script monitored husky-rs's own .husky/ instead of the user's project .husky/. If cargo build/cargo test ran before .husky/ existed, subsequent runs were cached and never re-ran — core.hooksPath was never set, hooks never triggered. (#15)
  • Submodule and worktree support: .git files were not correctly parsed (missing gitdir: prefix stripping). Hooks were silently never installed in submodules and git worktrees.
  • GitConfigFailed now tolerated: Build no longer fails if git is unavailable on PATH (e.g. NixOS without nix-shell). Users can fall back to husky init manually.

✨ Improvements

  • Windows compatibility: Hook trigger tests now convert backslashes to forward slashes for Git Bash compatibility.
  • Comprehensive test coverage: Added 17 new tests covering lazy hook creation, idempotent repeated execution, mixed cargo test/cargo build, hook triggering (pre-commit, commit-msg, post-commit, failure abort), CLI full workflow, and git failure graceful degradation.